<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Date Comparisons in Alteryx Designer Desktop Discussions</title>
    <link>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Date-Comparisons/m-p/40034#M15595</link>
    <description>&lt;P&gt;Looks like&amp;nbsp;the conditional statements for "NS" and "CIP" are the same, with your current logical statement I would expect no records result in CIP.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In plain English what logic would you like? That would help craft a statement&amp;nbsp;to match what you are looking for. Thank you!&lt;/P&gt;</description>
    <pubDate>Tue, 06 Dec 2016 18:58:10 GMT</pubDate>
    <dc:creator>Joe_Mako</dc:creator>
    <dc:date>2016-12-06T18:58:10Z</dc:date>
    <item>
      <title>Date Comparisons</title>
      <link>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Date-Comparisons/m-p/40022#M15594</link>
      <description>&lt;P&gt;Good Afternoon -&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Been stuck on this for a while now. &amp;nbsp;Any guidance would be greatly appreciated and may save me from going bald in the next 12 hours!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I created an IF Statement that looks at a Date Column compares it to DateTimeToday() and then results in a V-String, returning 1 of 3 different values.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; IF [ProjectStatus]="Re Hold" THEN "RE HOLD"&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;ELSEIF [ProjectStatus]="Site/REC Approved" &amp;amp;&amp;amp; [Construction_Start]&amp;lt;DateTimeToday() &amp;amp;&amp;amp; [Store_Open]&amp;gt;DateTimeToday() THEN "NS"&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;ELSEIF [ProjectStatus]="Site/REC Approved" &amp;amp;&amp;amp; [Construction_Start]&amp;lt;DateTimeToday() &amp;amp;&amp;amp; [Store_Open]&amp;gt;DateTimeToday() THEN "CIP"&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;ELSEIF [ProjectStatus]="Site/REC Approved" &amp;amp;&amp;amp; [Construction_Start]&amp;lt;DateTimeToday() &amp;amp;&amp;amp; [Store_Open]&amp;lt;DateTimeToday() THEN "OPEN"&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;ELSE "" ENDIF&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Currently the Database brings the dates in with the same format as Alteryx (yyyy-mm-dd) as a V_W String.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I run the script I do not get the results I would expect using the logic above. &amp;nbsp;So I have done a number of things to play around with it and received various results, none of which worked though.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;DateTimeFormat([dt],"%m-%d-%y) for both my dates&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Created a new column called Today. &amp;nbsp;Formated to match the formating directly above and replaced DateTimeToday() in my IF Statement with [Today]&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Changed my data type for all my dates to Date&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Then I have done various combinations of these&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you in advance for your time and help.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 May 2018 02:38:52 GMT</pubDate>
      <guid>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Date-Comparisons/m-p/40022#M15594</guid>
      <dc:creator>Brian32</dc:creator>
      <dc:date>2018-05-24T02:38:52Z</dc:date>
    </item>
    <item>
      <title>Re: Date Comparisons</title>
      <link>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Date-Comparisons/m-p/40034#M15595</link>
      <description>&lt;P&gt;Looks like&amp;nbsp;the conditional statements for "NS" and "CIP" are the same, with your current logical statement I would expect no records result in CIP.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In plain English what logic would you like? That would help craft a statement&amp;nbsp;to match what you are looking for. Thank you!&lt;/P&gt;</description>
      <pubDate>Tue, 06 Dec 2016 18:58:10 GMT</pubDate>
      <guid>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Date-Comparisons/m-p/40034#M15595</guid>
      <dc:creator>Joe_Mako</dc:creator>
      <dc:date>2016-12-06T18:58:10Z</dc:date>
    </item>
    <item>
      <title>Re: Date Comparisons</title>
      <link>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Date-Comparisons/m-p/40044#M15596</link>
      <description>&lt;P&gt;Hi Joe,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry about that. &amp;nbsp;I made an error when typing it in. &amp;nbsp;Plus I think I had a lot of unnecessary logic in there. This is my formula simplified.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;IF [ProjectStatus]="Re Hold" THEN "RE HOLD"&lt;BR /&gt;ELSEIF [Construction_Start]&amp;gt;DateTimeToday() THEN "NS"&lt;BR /&gt;ELSEIF [Construction_Start]&amp;lt;DateTimeToday() &amp;amp;&amp;amp; [Store_Open]&amp;gt;DateTimeToday() THEN "CIP"&lt;BR /&gt;ELSEIF [Store_Open]&amp;lt;DateTimeToday() THEN "OPEN"&lt;BR /&gt;ELSE "" ENDIF&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I work in the Real Estate department for a Retailer. &amp;nbsp;What I want to happen is, on the day I run the report, if a Construction Start Date is in the future and therefore hasn't happened yet, then I want it to return a status of "NS" (Not Started). &amp;nbsp;If the Construction Start Date is in the past, but the Store Open Date is in the future and yet to occur, then I want it to return a status of "CIP" (Construction in Progress). &amp;nbsp;Lastly If the Store Open Date is in the past then I want it to return a status of &amp;nbsp;"Open". &amp;nbsp;The first part, "RE HOLD" is just looking for if a project is currently on hold and therefore we are not concerned about where it is at in the construction process.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Dec 2016 19:37:43 GMT</pubDate>
      <guid>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Date-Comparisons/m-p/40044#M15596</guid>
      <dc:creator>Brian32</dc:creator>
      <dc:date>2016-12-06T19:37:43Z</dc:date>
    </item>
    <item>
      <title>Re: Date Comparisons</title>
      <link>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Date-Comparisons/m-p/40045#M15597</link>
      <description>&lt;P&gt;Also, I meant to add that OPEN is my current result. &amp;nbsp;It is as if it is not treating the value as a date for comparison. &amp;nbsp;If I switch the &amp;lt; and &amp;gt; signs I get NS. &amp;nbsp;Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 06 Dec 2016 19:39:08 GMT</pubDate>
      <guid>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Date-Comparisons/m-p/40045#M15597</guid>
      <dc:creator>Brian32</dc:creator>
      <dc:date>2016-12-06T19:39:08Z</dc:date>
    </item>
    <item>
      <title>Re: Date Comparisons</title>
      <link>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Date-Comparisons/m-p/40053#M15598</link>
      <description>&lt;P&gt;Everything seems good in your new expression, see attached for an example. What is the data type of your date fields, are they Date data type? You can check this with a Select tool.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If they are date data type, and it is still not giving you the result you are looking&amp;nbsp;for, can you attach a workflow with sample data, along with what results are incorrect and what you expect them to be? Thank you!&lt;/P&gt;</description>
      <pubDate>Tue, 06 Dec 2016 20:26:18 GMT</pubDate>
      <guid>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Date-Comparisons/m-p/40053#M15598</guid>
      <dc:creator>Joe_Mako</dc:creator>
      <dc:date>2016-12-06T20:26:18Z</dc:date>
    </item>
    <item>
      <title>Re: Date Comparisons</title>
      <link>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Date-Comparisons/m-p/40057#M15599</link>
      <description>&lt;P&gt;Hey Joe,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again for helping.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Dates are coming in from the Database as a V_W String. &amp;nbsp;I then do DateTimeFormat([Construction_Start],"%m-%d-%y") and the same for [Store Open]. &amp;nbsp;My IF statement then comes in after that.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does doing a DateFormat not turn it to a date?&lt;/P&gt;</description>
      <pubDate>Tue, 06 Dec 2016 20:38:31 GMT</pubDate>
      <guid>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Date-Comparisons/m-p/40057#M15599</guid>
      <dc:creator>Brian32</dc:creator>
      <dc:date>2016-12-06T20:38:31Z</dc:date>
    </item>
    <item>
      <title>Re: Date Comparisons</title>
      <link>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Date-Comparisons/m-p/40065#M15600</link>
      <description>&lt;P&gt;See&amp;nbsp;&lt;A href="https://help.alteryx.com/10.6/index.htm#Reference/DateTimeFunctions.htm" target="_blank"&gt;https://help.alteryx.com/10.6/index.htm#Reference/DateTimeFunctions.htm&lt;/A&gt; and expand the "Input and Output" section.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;DateTimeFormat outputs a String data type&lt;/P&gt;&lt;P&gt;DateTimeParse outputs a Date data type that Alteryx can use&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You will want to use the DateTimeParse function and have it be a Date Data Type, for example:&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://community.alteryx.com/t5/image/serverpage/image-id/10916i4443A88840FB1AE6/image-size/original?v=v2&amp;amp;px=-1" border="0" alt="parse.png" title="parse.png" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you do not want to create a seperate field, and change the data type, you can use the Multi-Field Formula tool, like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://community.alteryx.com/t5/image/serverpage/image-id/10917i4FAC441927BF7C21/image-size/original?v=v2&amp;amp;px=-1" border="0" alt="multi parse.png" title="multi parse.png" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Dec 2016 21:03:33 GMT</pubDate>
      <guid>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Date-Comparisons/m-p/40065#M15600</guid>
      <dc:creator>Joe_Mako</dc:creator>
      <dc:date>2016-12-06T21:03:33Z</dc:date>
    </item>
    <item>
      <title>Re: Date Comparisons</title>
      <link>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Date-Comparisons/m-p/40077#M15601</link>
      <description>&lt;P&gt;I went ahead and did the MultiField Formula and that caused all of my Dates to go [Null].&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://community.alteryx.com/t5/image/serverpage/image-id/10923iCADA8F1AE0209F84/image-size/original?v=v2&amp;amp;px=-1" border="0" alt="MultiField Formula.PNG" title="MultiField Formula.PNG" /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Dec 2016 21:58:11 GMT</pubDate>
      <guid>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Date-Comparisons/m-p/40077#M15601</guid>
      <dc:creator>Brian32</dc:creator>
      <dc:date>2016-12-06T21:58:11Z</dc:date>
    </item>
    <item>
      <title>Re: Date Comparisons</title>
      <link>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Date-Comparisons/m-p/40078#M15602</link>
      <description>&lt;P&gt;What are some example string values before this step, are they inded:&lt;/P&gt;&lt;P&gt;01-31-16&lt;/P&gt;&lt;P&gt;or some other format?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Are all the fields you checked in the select box at top dates?&lt;/P&gt;</description>
      <pubDate>Tue, 06 Dec 2016 22:01:05 GMT</pubDate>
      <guid>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Date-Comparisons/m-p/40078#M15602</guid>
      <dc:creator>Joe_Mako</dc:creator>
      <dc:date>2016-12-06T22:01:05Z</dc:date>
    </item>
    <item>
      <title>Re: Date Comparisons</title>
      <link>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Date-Comparisons/m-p/40079#M15603</link>
      <description>&lt;P&gt;Oh ok, I misunderstood the parse tool. &amp;nbsp;So to parse you are stating the format the date is in now? &amp;nbsp;I changed that and that worked. &amp;nbsp;Now after my calculation am I then safe to change the format to %m-%d-%y using DateTimeFormat?&lt;/P&gt;</description>
      <pubDate>Tue, 06 Dec 2016 22:07:09 GMT</pubDate>
      <guid>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Date-Comparisons/m-p/40079#M15603</guid>
      <dc:creator>Brian32</dc:creator>
      <dc:date>2016-12-06T22:07:09Z</dc:date>
    </item>
    <item>
      <title>Re: Date Comparisons</title>
      <link>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Date-Comparisons/m-p/40080#M15604</link>
      <description>&lt;P&gt;No worries, data types can be tricky, and sometimes it is difficult&amp;nbsp;to keep track of what field is what.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After your above formula expression&amp;nbsp;that compares&amp;nbsp;the Date data type values, you can change them&amp;nbsp;to strings with the DateTimeFormat function to get he display that you want.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Dec 2016 22:12:11 GMT</pubDate>
      <guid>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Date-Comparisons/m-p/40080#M15604</guid>
      <dc:creator>Joe_Mako</dc:creator>
      <dc:date>2016-12-06T22:12:11Z</dc:date>
    </item>
    <item>
      <title>Re: Date Comparisons</title>
      <link>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Date-Comparisons/m-p/40083#M15605</link>
      <description>&lt;P&gt;I think I am missing something here too then cause this nulls me out again.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://community.alteryx.com/t5/image/serverpage/image-id/10924i21D04F175D07E19B/image-size/original?v=v2&amp;amp;px=-1" border="0" alt="DateTimeFormat.PNG" title="DateTimeFormat.PNG" /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Dec 2016 22:18:26 GMT</pubDate>
      <guid>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Date-Comparisons/m-p/40083#M15605</guid>
      <dc:creator>Brian32</dc:creator>
      <dc:date>2016-12-06T22:18:26Z</dc:date>
    </item>
    <item>
      <title>Re: Date Comparisons</title>
      <link>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Date-Comparisons/m-p/40189#M15606</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.alteryx.com/t5/user/viewprofilepage/user-id/7541"&gt;@Brian32&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It sounds like you may need further support on your questions. &amp;nbsp;If this is the case please email into support@alteryx.com and&amp;nbsp;we will be happy to assist you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;</description>
      <pubDate>Wed, 07 Dec 2016 20:21:41 GMT</pubDate>
      <guid>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Date-Comparisons/m-p/40189#M15606</guid>
      <dc:creator>JessicaS</dc:creator>
      <dc:date>2016-12-07T20:21:41Z</dc:date>
    </item>
  </channel>
</rss>

