We've recently made an accessibility improvement to the community and therefore posts without any content are no longer allowed. Please use the spoiler feature or add a short message in the message body in order to submit your weekly challenge.
alteryx Community

# Weekly Challenge

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

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

We're actively looking for ideas on how to improve Weekly Challenges and would love to hear what you think!

Submit Feedback

## Challenge #4: Date Parsing

11 - Bolide

Solved, fun little exercise.

Spoiler
7 - Meteor
Spoiler
Regular expressions and DateTimeParse make this less difficult than it looks.  However, if this was a real request for parsing out datetime from lots of strings, I'd advise using a library instead of writing the regular expressions, since these expressions will also pull nonsense strings of text and digits that match the date format..
8 - Asteroid
Spoiler
First one I've solved in a while. I managed to solve using just one RegEx and Formula tool!

5 - Atom
Spoiler

I used two different RegEx expressions to pull out the dates:

(\d{1,2}[- ][a-zA-Z]{3,10}[- ]\d{2,4})       parses 16-APR-2005, 4-SEP-00

⦁ 1 to 2 digits                                                 \d{1,2}
⦁ either a dash ("-") or a space (" ")    [- ]
⦁ 3 to 10 letters                                           [a-zA-Z]{3,10} ---OR--- \D{3,10} ---OR--- [[:alpha:]]{3,10}
⦁ either a dash ("-") or a space (" ")    [- ]
⦁ 2 to 4 digits                                                 \d{2,4}

([a-zA-Z]{3}\s\d{1,2}[,]{0,1}\s\d{2,4})     parses Nov 16, 1900, Jan 5 2000

⦁ 3 letters                                                        [a-zA-Z]{3,10} ---OR--- \D{3,10} ---OR--- [[:alpha:]]{3,10}
⦁ a space (" ")                                                  \s
⦁ 1 to 2 digits                                                 \d{1,2}
⦁ an optional comma                                [,]{0,1}
⦁ a space (")                                                    \s

⦁ 2 to 4 digits                                                 \d{2,4}

I then use a formula to convert the RegEx Results into a useable date field:

This is one of the shorter solutions.  Note that the two RegEx functions could be combined into a single tool.

8 - Asteroid

Maybe not the most efficient way but managed to parse them all.

Spoiler

8 - Asteroid
Spoiler
6 - Meteoroid

I truly think this could be done in one tool but RegEx hurts my brain

Spoiler

6 - Meteoroid

not the most elegant without a date parse tool but it works

Alteryx
Spoiler

7 - Meteor

RegEx is my bane.

Here's my solution.