alteryx Community

# 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.

## Challenge #68: Elapsed Classroom Times

6 - Meteoroid

Good puzzle for learning about the formula tool and various functions.

7 - Meteor

Solution attached.

Spoiler
9 - Comet

#68

7 - Meteor

I have questions and disgruntlements with this one. What schedule doesn't use the 24 hour clock for clarity? Why convert it to a 12 hour clock is the purpose is analysis? If we are doing this, why not convert to an actual date-time so that datetime math can be used?  Why does the solution not want us to specify AM versus PM? How are there classes on the schedule that end before they start - are they literally 23 hour classes? Why eliminated "TBD" classes and Null times in this case? Shouldn't those still be included for schedule clarity?

Instead of one complicated formula function that doesn't convert to datetime, just "gives the answer" I did break our the strings and used RegEx to define the time "words" of the times in string form. If someone could give a good walkthrough on how to do the datetime conversion from string cleanly I'd actually like to know that

7 - Meteor

8 - Asteroid

Solution

7 - Meteor

The offered solution was waaaaaay more efficient than mine, although the challenge was to translate military time to civilian (e.g., 1630 to 4:30). The offered solution translated them to 04:30, whereas I dropped the leading zeros.

7 - Meteor

I had the same thought and problem, when working with a number the math was easy - if over 1200 subtract 1200, done. But you can't add leading 0's to Numbers, just strings. I tore my hair out for a bit trying to get that I would want my expectations to be to match what they were willing to work with.

After all, why not just use 24 hour time? It makes so much more sense.

7 - Meteor

Done

8 - Asteroid

Completed!