community
cancel
Showing results for 
Search instead for 
Did you mean: 
Do you have the skills to make it to the top? Subscribe to our weekly challenges. Try your best to solve the problem, share your solution, and see how others tackled the same problem. We share our answer too.
Weekly Challenge
Do you have the skills to make it to the top? Subscribe to our weekly challenges. Try your best to solve the problem, share your solution, and see how others tackled the same problem. We share our answer too.
Unable to display your progress at this time. Please try again a little later, or contact an administrator if you continue to see this error.
Getting started with Designer? | Start your journey with our new Learning Path!

Challenge #10: Date Time Calculations

Alteryx Certified Partner

Hi @Kirstyp,

If you have converted your two date fields to actual datetime format using the date parse tool, you can build a formula using datetimediff(datetimeA,datetimeB,"minutes") which will give you the difference between the two regardless of whether it goes over to the next day.

Asteroid

Great, thanks very much for your help.

Alteryx Certified Partner

Solution attached.

Spoiler
WC10.png

Attached solution with one formula field(3 formulae)

Alteryx Certified Partner

Here's my solution.

 

Spoiler
Screen Shot 2017-08-27 at 14.31.47.png
Alteryx Certified Partner

 

Spoiler
Used MOD function as well

Screen Shot 2017-08-28 at 00.29.32.png

 

Asteroid

Close but no cigar for me. Didn't know about the modulo function so used Floor instead, which got me close but not 100%.

Alteryx Certified Partner
Alteryx Certified Partner

This one was good, never had a usecase for the MOD function before so was handy to get some practice with this.

 

Spoiler
Capture.PNG
Spoiler
Just used a bunch of datetimediff functions and subtracted the parts.
Capture.PNG
Alteryx Certified Partner

I find the solution provided here quite confusing and requires a great deal of unpicking. Mine I find intuitive (but then I would I suppose...). For each subdivision:

  • Add the previous subdivision(s) to the timestamp
  • Take a datetimediff between the TIMESTAMP and the new Time_Now.

Done.