<?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: Comparing current date to static date then adding X days in Alteryx Designer Desktop Discussions</title>
    <link>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Comparing-current-date-to-static-date-then-adding-X-days/m-p/484584#M98124</link>
    <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.alteryx.com/t5/user/viewprofilepage/user-id/94153"&gt;@dareinnyc&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;if DateTimeDiff([DateTimeNow(), [Target Hire Date], 'days') &amp;lt; 30
then DateTimeAdd([Target Hire Date],30,"days")
else [Target Hire Date]
endif&lt;/LI-CODE&gt;&lt;P&gt;Let me know if this works.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;P&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 04 Nov 2019 17:20:33 GMT</pubDate>
    <dc:creator>philipmannering</dc:creator>
    <dc:date>2019-11-04T17:20:33Z</dc:date>
    <item>
      <title>Comparing current date to static date then adding X days</title>
      <link>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Comparing-current-date-to-static-date-then-adding-X-days/m-p/484580#M98122</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need help coming up with a formula to:&lt;/P&gt;&lt;P&gt;1. Pull today's date (date only)&lt;/P&gt;&lt;P&gt;2. Compare it to the target hire date.&lt;/P&gt;&lt;P&gt;3. If today's date is within 30 days of the target hire date (i.e. Today's date - target hire date &amp;lt; 30)&lt;/P&gt;&lt;P&gt;4. Then add 30 days to the estimated hire date (new column called new target hire date)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;My current formula is (wrong):&lt;/U&gt;&lt;/P&gt;&lt;P&gt;IF DateTimeNow()-[Target Hire Date]&amp;lt;30&lt;BR /&gt;THEN DateTimeAdd([Target Hire Date],30,"days")&lt;BR /&gt;ELSE [Target Hire Date]&lt;BR /&gt;ENDIF&lt;/P&gt;</description>
      <pubDate>Mon, 04 Nov 2019 17:17:30 GMT</pubDate>
      <guid>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Comparing-current-date-to-static-date-then-adding-X-days/m-p/484580#M98122</guid>
      <dc:creator>dareinnyc</dc:creator>
      <dc:date>2019-11-04T17:17:30Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing current date to static date then adding X days</title>
      <link>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Comparing-current-date-to-static-date-then-adding-X-days/m-p/484584#M98124</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.alteryx.com/t5/user/viewprofilepage/user-id/94153"&gt;@dareinnyc&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;if DateTimeDiff([DateTimeNow(), [Target Hire Date], 'days') &amp;lt; 30
then DateTimeAdd([Target Hire Date],30,"days")
else [Target Hire Date]
endif&lt;/LI-CODE&gt;&lt;P&gt;Let me know if this works.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;P&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Nov 2019 17:20:33 GMT</pubDate>
      <guid>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Comparing-current-date-to-static-date-then-adding-X-days/m-p/484584#M98124</guid>
      <dc:creator>philipmannering</dc:creator>
      <dc:date>2019-11-04T17:20:33Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing current date to static date then adding X days</title>
      <link>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Comparing-current-date-to-static-date-then-adding-X-days/m-p/484592#M98128</link>
      <description>&lt;P&gt;Classification: Internal&lt;BR /&gt;Hi, this doesn't seem to work as it is still adding 30 days to all target hire dates after datetimenow. The logic should only add 30 days to the target hire date should the original target hire date be less than 30 days from datetimenow. Thanks&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Nov 2019 17:33:00 GMT</pubDate>
      <guid>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Comparing-current-date-to-static-date-then-adding-X-days/m-p/484592#M98128</guid>
      <dc:creator>dareinnyc</dc:creator>
      <dc:date>2019-11-04T17:33:00Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing current date to static date then adding X days</title>
      <link>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Comparing-current-date-to-static-date-then-adding-X-days/m-p/484644#M98153</link>
      <description>&lt;P&gt;Its ok, i switched the fields around and it works now.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;IF DateTimeDiff(&lt;FONT color="#FF0000"&gt;[Target Hire Date],DateTimeNow(),&lt;/FONT&gt; 'days')&amp;lt;30&lt;BR /&gt;THEN DateTimeAdd([Target Hire Date],60,"days") ELSE [Target Hire Date]&lt;BR /&gt;ENDIF&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Nov 2019 18:28:50 GMT</pubDate>
      <guid>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Comparing-current-date-to-static-date-then-adding-X-days/m-p/484644#M98153</guid>
      <dc:creator>dareinnyc</dc:creator>
      <dc:date>2019-11-04T18:28:50Z</dc:date>
    </item>
  </channel>
</rss>

