We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

6 Digit Date Parse Issue

gab3
7 - Meteor

I am trying to parse a 6 digit date using the DateTimeParse formula.  The date string looks like 180401 for April 01, 2018.  The formula that I have entered below is returning a date of 1804-09-01.  I am not able to get the function to recognize that the year is a 2 digits.

 

DateTimeParse(180401,"%y%m%d)

 

Any ideas on how to resolve this issue?  Any insight would be greatly appreciated.

1 REPLY 1
MarqueeCrew
20 - Arcturus
20 - Arcturus

@gab3,

 

 DateTimeParse(Trim(REGEX_Replace(tostring([DateField]), "(\d{2})", '$1-'),"-"),"%y-%m-%d")

I am just now reviewing this using alteryx and see the issue.

 

BTW, just posted this KB article:  https://community.alteryx.com/t5/Alteryx-Knowledge-Base/Marquee-Crew-s-Guide-to-Dates/ta-p/156024

 

I don't like it, but this works.

 

Cheers,

Mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
Labels
Top Solution Authors