In case you missed the announcement: The Alteryx One Fall Release is here! Learn more about the new features and capabilities here
ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests after December 31, 2025. Set up your security questions now so you can recover your account anytime, just log out and back in to get started. Learn more here
Start Free Trial

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 #316: Blowing in the Wind - Part 1

Erin
11 - Bolide

I always try to avoid RegEx - but can't - and then have to spend time figuring it out. 😐

AGilbert
11 - Bolide

Love some regex practice.

 

lwolfie
11 - Bolide

Great parsing exercise

danbostrom
8 - Asteroid

 

 

Bobbyt23
13 - Pulsar

Lovely bit of Regex to sort the data. Ooof.

aiahwieder
9 - Comet

The answer, my friend . . .

cmoussa
8 - Asteroid

WF.png

 

robert-headington
8 - Asteroid

#316

Suresh_batchu
8 - Asteroid

Solved !!

 

316 Snippet Solution.png

3I_ATLAS
9 - Comet

The hardest parts are the RegEx:

 

Spoiler
(.*)\s+(\d+) MPH\s{3,10}(.*)\s{3,10}(.*)

followed by the parsing of the time:

Spoiler
if contains ([TimeDate],'AM') then
if tonumber(left([TimeDate],2))= 12 then
"00"+":"+Substring([TimeDate],2,2)+":00"
else
left([TimeDate],2)+":"+Substring([TimeDate],2,2)+":00"
endif
else
if tonumber(left([TimeDate],2))= 12 then
left([TimeDate],2)+":"+Substring([TimeDate],2,2)+":00"
else
tostring(12+ tonumber(left([TimeDate],2)))+":"+Substring([TimeDate],2,2)+":00"
endif
endif

Final solution:

Spoiler
WC_316.jpg