Weekly Challenge

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

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

Submit Feedback
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.

Challenge #68: Elapsed Classroom Times

Highlighted
8 - Asteroid

Here is my solution, it is a little bit different than the proposed one but I got the same results.

Highlighted
8 - Asteroid

Challenge #68 solved!

 

clipboard_image_0.png

Highlighted
7 - Meteor

Solution attached

Highlighted
Inactive User
Not applicable

clipboard_image_0.png

Highlighted
8 - Asteroid

Great challenge!

 

Spoiler
68 pic.png
Highlighted
Alteryx
Alteryx

I thought about doing it all in just a formula tool, but why waste all of the dev effort put into the Date Time Parse?

 

Spoiler
68_challenge.jpg

 

Highlighted
8 - Asteroid

clipboard_image_0.png

Highlighted
8 - Asteroid

Lots of if!

Spoiler
68.png
Highlighted
Alteryx Partner

I suspect my answer is a bit too brute force (due to my not yet knowing all of the datetime functions, but I got there.  Thanks to Marquee Crew's Expect Equal tool, I found some problems along the way.  And in fact, there are some negative elapsed times in the solution set (ahem!)

 

What I learned:

- Don't trust the first few records as proving the accuracy of your result

- Expect Equal is pretty awesome

- There should be universal time standards (enforceable by a long sentence at hard labour) so this sort of problem doesn't arise ever again

Spoiler
Process:
- Add leading 0 to time string if needed
- Convert start and end times to datetime format
- Calculate difference between start and end time
- Remove additional 12 hours for afternoon/evening times
- Add leading 0 to time string if needed
MySolution.PNG
Highlighted
Alteryx Partner

Your solution is so much simpler than mine - good lessons - thanks