Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Weekly Challenges

Solve the challenge, share your solution and summit the ranks of our Community!

Also available in | Français | Português | Español | 日本語
IDEAS WANTED

Want to get involved? We're always looking for ideas and content for Weekly Challenges.

SUBMIT YOUR IDEA

Challenge #4: Date Parsing

KOBoyle
11 - Bolide

Solution attached.  I wasn't familiar with RegEx, so I needed to do some research and peak at the solution.  I found using a single formula after the RegEx parse to be simpler.

 

Ken

Philip
12 - Quasar

Weekly challenge 4 done.

 

Spoiler
Weekly Challenge 004.png

Formula tool:
IF REGEX_Match([Field_11], "\d+-\u{3}-\d{2}")
    THEN DateTimeParse([Field_11], "%d-%b-%y")
ELSEIF REGEX_Match([Field_11], "\d+-\u{3}-\d{4}")
    THEN DateTimeParse([Field_11], "%d-%b-%Y")
ELSEIF REGEX_Match([Field_11], "\d+-[\u\l]+-\d{4}")
    THEN DateTimeParse([Field_11], "%d-%B-%Y")
ELSEIF REGEX_Match([Field_11], "[\u\l]{3} \d+, \d{4}")
    THEN DateTimeParse([Field_11], "%b %d, %Y")
ELSEIF REGEX_Match([Field_11], "[\u\l]+ \d+ \d{4}")
    THEN DateTimeParse([Field_11], "%B %d %Y")
ELSE NULL()
ENDIF
JORGE4900
8 - Asteroid

I really enjoyed working on this solution because I appreciate the advantages of regular expressions. On my first try, I did a long version of columns using additional regex tools; on my second try, I used a slightly different approach with a single regex tool. Somehow on this last try, I ended up parsing a T on column 6.

 

I guess that I should have used the two or more digits option instead of forcing the two and four digit year onto their own columns.

JORGE4900
8 - Asteroid

That was a pretty good solution @MarqueeCrew

nick_ceneviva
11 - Bolide

Awesome challenge to use the RegEx tool.  Solution is attached.

PhilipMannering
16 - Nebula
16 - Nebula

I love my regex. Still not up to @MarqueeCrew's standards though...

 

Spoiler
Two tools with some nifty regex
MarqueeCrew
20 - Arcturus
20 - Arcturus
Thanks for the mention!
Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
Amarendra
10 - Fireball

This link from @AlexKo helped me understand the 'RegEx' Thank you Alex for such a comprehensive resource.
Attached is the 4th challenge solution.

dheerajpoojari
7 - Meteor

My solution attached. was a good refresher to regex

Spoiler
challenge4.png
derekbelyea
12 - Quasar

This was a good exercise to reinforce my regex skills.  My solution looks similar to others I found here.

 

Derek