Weekly Challenge

Solve the challenge, share your solution and summit the ranks of our Community!
New content is available in Academy! You may need to clear your browser cache for an optimal viewing experience

Challenge #4: Date Parsing

Highlighted
Asteroid

That was hard - I managed to use three separate regex tools to match all the dates, then joined them based on most specific match to least specific

Highlighted
Asteroid
Spoiler
Challenge#4.png
Highlighted
Alteryx Certified Partner

Shout out to @markp201 for his RegEx solution for which I had to learn RegEx first in order to understand the meaning of it

 

Spoiler
4.png
Meteor

Solution Attached. Regex makes this a lot easier!

 

Spoiler
Spoiler

Challenge_4_start_file_AR.yxmd.png

 

Highlighted
Alteryx
Alteryx
Spoiler
image.png

Fun!  With only four date formats, it seemed simpler to just filter and parse each format separately than to convert them.

Highlighted
Asteroid

Learned a lot about regular expressions:

Spoiler
(0?[1-9]|[12][0-9]|3[01]|JAN|FEB|MAR|MAY|APR|JUL|JUN|AUG|OCT|SEP|NOV|DEC)

[- /.]

(JAN|FEB|MAR|MAY|APR|JUL|JUN|AUG|OCT|SEP|NOV|DEC|JULY|0?[1-9]|[12][0-9]|3[01])

[- /.,]

(18\d\d| ?19\d\d|20\d\d|\d\d)
Highlighted
Asteroid

Here's my solution!

Spoiler
Capture.JPG
Highlighted
Meteoroid

Hi All - here's my solution. It somewhat lacks the same level of detail as the solution but works quite nicely. This one I loved doing as very typical of things I've had to clean up at work. 

Highlighted

Used Regular Expression tool and DateTime Tool to extract dates and convert from strings.

Highlighted

My version.