<?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 conversion in Alteryx Designer Desktop Discussions</title>
    <link>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Date-conversion/m-p/48409#M18436</link>
    <description>&lt;P&gt;3 Feb. 2008 and&lt;/P&gt;
&lt;P&gt;Jan. 1, 2017&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;require different formulas.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The formula that I provided solves for the first case. &amp;nbsp;While I can solve for the second case, is your input a mixture of different formats? &amp;nbsp;If it is, then you'll need to check the format for any given field before converting it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;DateTimeParse([Date2],'%b. %d, %Y')&lt;/PRE&gt;
&lt;P&gt;Does this make sense?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Mark&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 01 Mar 2017 22:48:25 GMT</pubDate>
    <dc:creator>MarqueeCrew</dc:creator>
    <dc:date>2017-03-01T22:48:25Z</dc:date>
    <item>
      <title>Date conversion</title>
      <link>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Date-conversion/m-p/48391#M18433</link>
      <description>&lt;P&gt;Hi, I've been looking through the forums but haven't quite figured out my date conversion problem.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've gotten the date into this format:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3 Feb. 2008&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and have tried this formula to get it into a date format:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;DateTimeFormat(DateTimeParse([Date2],'%d/%b/%Y'),'%m-%d-%Y')&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but I get null values where the day is a single digit, e.g.: 3 Feb. 2008&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Specifically, I get a message that the day of month value is out of range 1..31. &amp;nbsp;Somehow, when the day is a single digit, the month value isn't seen properly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for any help.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Mar 2017 21:54:05 GMT</pubDate>
      <guid>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Date-conversion/m-p/48391#M18433</guid>
      <dc:creator>timsmith</dc:creator>
      <dc:date>2017-03-01T21:54:05Z</dc:date>
    </item>
    <item>
      <title>Re: Date conversion</title>
      <link>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Date-conversion/m-p/48405#M18434</link>
      <description>&lt;P&gt;&lt;U&gt;&lt;/U&gt;&lt;a href="https://community.alteryx.com/t5/user/viewprofilepage/user-id/11034"&gt;@timsmith&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If your target variable is a DATE field (a valid date), then this formula is what you're looking for:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;DateTimeParse([Date2],'%d %b. %Y')&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 400px;"&gt;&lt;img src="https://community.alteryx.com/t5/image/serverpage/image-id/13309iFA3C50506E3AD14B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;As you can see, it takes your input 3 Feb. 2008 and reformats it to: &amp;nbsp;2008-02-03&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It expects to see a DAY# followed by a SPACE followed by a MONTH ABBREVIATION followed by a PERIOD followed by a SPACE followed by a YEAR.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hopefully this solves your challenge.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cheers,&lt;/P&gt;
&lt;P&gt;Mark&lt;/P&gt;</description>
      <pubDate>Wed, 01 Mar 2017 22:24:47 GMT</pubDate>
      <guid>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Date-conversion/m-p/48405#M18434</guid>
      <dc:creator>MarqueeCrew</dc:creator>
      <dc:date>2017-03-01T22:24:47Z</dc:date>
    </item>
    <item>
      <title>Re: Date conversion</title>
      <link>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Date-conversion/m-p/48408#M18435</link>
      <description>&lt;P&gt;Mark,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Thanks very much for your reply.&lt;/P&gt;&lt;P&gt;&amp;nbsp; I&amp;nbsp;tried that but am still&amp;nbsp;getting errors for the single-digit days. &amp;nbsp;Here's what I see for Jan. 1, 2017, for example:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="error.PNG" style="width: 793px;"&gt;&lt;img src="https://community.alteryx.com/t5/image/serverpage/image-id/13310i7D27BD830E9BD643/image-size/large?v=v2&amp;amp;px=999" role="button" title="error.PNG" alt="error.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; I has no trouble with any days of the month greater than 9; it's only the single digit days that I see errors for. &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; -Tim&lt;/P&gt;</description>
      <pubDate>Wed, 01 Mar 2017 22:41:59 GMT</pubDate>
      <guid>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Date-conversion/m-p/48408#M18435</guid>
      <dc:creator>timsmith</dc:creator>
      <dc:date>2017-03-01T22:41:59Z</dc:date>
    </item>
    <item>
      <title>Re: Date conversion</title>
      <link>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Date-conversion/m-p/48409#M18436</link>
      <description>&lt;P&gt;3 Feb. 2008 and&lt;/P&gt;
&lt;P&gt;Jan. 1, 2017&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;require different formulas.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The formula that I provided solves for the first case. &amp;nbsp;While I can solve for the second case, is your input a mixture of different formats? &amp;nbsp;If it is, then you'll need to check the format for any given field before converting it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;DateTimeParse([Date2],'%b. %d, %Y')&lt;/PRE&gt;
&lt;P&gt;Does this make sense?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Mark&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Mar 2017 22:48:25 GMT</pubDate>
      <guid>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Date-conversion/m-p/48409#M18436</guid>
      <dc:creator>MarqueeCrew</dc:creator>
      <dc:date>2017-03-01T22:48:25Z</dc:date>
    </item>
    <item>
      <title>Re: Date conversion</title>
      <link>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Date-conversion/m-p/48412#M18437</link>
      <description>&lt;P&gt;I understand -- and I wasn't clear about the data I am working with.&lt;/P&gt;&lt;P&gt;All the data look like this, which shows what you see in the Date2 field on the far right:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="error2.PNG" style="width: 601px;"&gt;&lt;img src="https://community.alteryx.com/t5/image/serverpage/image-id/13312i3B8071EC68749E7A/image-size/large?v=v2&amp;amp;px=999" role="button" title="error2.PNG" alt="error2.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The formula works fine for all but the first two rows, the ones with the single digit day numbers, Feb. 4 and Jan. 7. &amp;nbsp;I've tried taking out leading and trailing whitespace but that didn't solve the problem.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again Mark for help me with this.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Tim&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Mar 2017 23:01:18 GMT</pubDate>
      <guid>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Date-conversion/m-p/48412#M18437</guid>
      <dc:creator>timsmith</dc:creator>
      <dc:date>2017-03-01T23:01:18Z</dc:date>
    </item>
    <item>
      <title>Re: Date conversion</title>
      <link>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Date-conversion/m-p/48413#M18438</link>
      <description>&lt;P&gt;can you save the date2 data to an EXCEL :( file and post it. &amp;nbsp;I'll reply with a solution promptly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Mark&lt;/P&gt;</description>
      <pubDate>Wed, 01 Mar 2017 23:03:19 GMT</pubDate>
      <guid>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Date-conversion/m-p/48413#M18438</guid>
      <dc:creator>MarqueeCrew</dc:creator>
      <dc:date>2017-03-01T23:03:19Z</dc:date>
    </item>
    <item>
      <title>Re: Date conversion</title>
      <link>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Date-conversion/m-p/48414#M18439</link>
      <description>&lt;P&gt;Sure. &amp;nbsp;Here you go.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks very much, Mark!&lt;/P&gt;</description>
      <pubDate>Wed, 01 Mar 2017 23:09:39 GMT</pubDate>
      <guid>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Date-conversion/m-p/48414#M18439</guid>
      <dc:creator>timsmith</dc:creator>
      <dc:date>2017-03-01T23:09:39Z</dc:date>
    </item>
    <item>
      <title>Re: Date conversion</title>
      <link>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Date-conversion/m-p/48416#M18440</link>
      <description>&lt;LI-SPOILER&gt;DateTimeParse([Date2],'%d %b. %Y')&lt;/LI-SPOILER&gt;
&lt;P&gt;That works 100% of the time with the file that you gave me.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you have whitespace, try:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;DateTimeParse(Trim([Date2]),'%d %b. %Y')&lt;/PRE&gt;
&lt;P&gt;I can watch you via WebEx now and control your screen to get you a 100% solution working. &amp;nbsp;For me, it looks fine with your data. &amp;nbsp;If you want a silent webex, please PM me with your email &amp;amp; I'll set it up.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cheers,&lt;/P&gt;
&lt;P&gt;Mark&lt;/P&gt;</description>
      <pubDate>Wed, 01 Mar 2017 23:16:16 GMT</pubDate>
      <guid>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Date-conversion/m-p/48416#M18440</guid>
      <dc:creator>MarqueeCrew</dc:creator>
      <dc:date>2017-03-01T23:16:16Z</dc:date>
    </item>
    <item>
      <title>Re: Date conversion</title>
      <link>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Date-conversion/m-p/48426#M18441</link>
      <description>&lt;P&gt;&lt;a href="https://community.alteryx.com/t5/user/viewprofilepage/user-id/11034"&gt;@timsmith&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Magic! &amp;nbsp;Not the good kind. &amp;nbsp;I can't explain why it is the way that it is, but if the input to the formula is saved and then read into the formula, it works. &amp;nbsp;My solution required me to REFORMAT the date using a regular expression and then padleft the date if it was a single digit. &amp;nbsp;Then the parse function worked perfectly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;a href="https://community.alteryx.com/t5/user/viewprofilepage/user-id/490"&gt;@BenG&lt;/a&gt;, if you have time to work with me and Tim, please contact me (not today) and I'd like to explore this with you. &amp;nbsp;Literally, the adobe inputs were replaced with text inputs (sourced by browsing their output, cutting and pasting them to another workflow) and my original solution worked.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This was all conducted with version 10.6&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cheers,&lt;/P&gt;
&lt;P&gt;Mark&lt;/P&gt;</description>
      <pubDate>Thu, 02 Mar 2017 00:40:54 GMT</pubDate>
      <guid>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Date-conversion/m-p/48426#M18441</guid>
      <dc:creator>MarqueeCrew</dc:creator>
      <dc:date>2017-03-02T00:40:54Z</dc:date>
    </item>
    <item>
      <title>Re: Date conversion</title>
      <link>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Date-conversion/m-p/48427#M18442</link>
      <description>&lt;P&gt;Can't thank you enough, Mark! I appreciate your persistence in figuring this out.&lt;/P&gt;&lt;P&gt;Tim&lt;/P&gt;</description>
      <pubDate>Thu, 02 Mar 2017 00:43:05 GMT</pubDate>
      <guid>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Date-conversion/m-p/48427#M18442</guid>
      <dc:creator>timsmith</dc:creator>
      <dc:date>2017-03-02T00:43:05Z</dc:date>
    </item>
    <item>
      <title>Re: Date conversion</title>
      <link>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Date-conversion/m-p/48480#M18443</link>
      <description>&lt;P&gt;When I added a full year's worth of data, I see that because "May" is not abbreviated with a period at the end, I get null values for all dates in May. &amp;nbsp;Is there any way to adjust the Regex so that it works for May dates?&lt;/P&gt;&lt;P&gt;Tim&lt;/P&gt;</description>
      <pubDate>Thu, 02 Mar 2017 16:53:10 GMT</pubDate>
      <guid>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Date-conversion/m-p/48480#M18443</guid>
      <dc:creator>timsmith</dc:creator>
      <dc:date>2017-03-02T16:53:10Z</dc:date>
    </item>
    <item>
      <title>Re: Date conversion</title>
      <link>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Date-conversion/m-p/48494#M18444</link>
      <description>&lt;P&gt;put the following in front of your formula:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;REPLACE(&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then put this at the end:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;,"May.",'May')&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That will cause only May to lose the .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;:)&lt;/P&gt;</description>
      <pubDate>Thu, 02 Mar 2017 17:37:34 GMT</pubDate>
      <guid>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Date-conversion/m-p/48494#M18444</guid>
      <dc:creator>MarqueeCrew</dc:creator>
      <dc:date>2017-03-02T17:37:34Z</dc:date>
    </item>
    <item>
      <title>Re: Date conversion</title>
      <link>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Date-conversion/m-p/48559#M18445</link>
      <description>&lt;P&gt;That works -- thanks very much!&lt;/P&gt;&lt;P&gt;-Tim&lt;/P&gt;</description>
      <pubDate>Thu, 02 Mar 2017 23:09:27 GMT</pubDate>
      <guid>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Date-conversion/m-p/48559#M18445</guid>
      <dc:creator>timsmith</dc:creator>
      <dc:date>2017-03-02T23:09:27Z</dc:date>
    </item>
  </channel>
</rss>

