Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

Difference between datetime values

AbdulBalogun
7 - Meteor

I have two datetime values date1:  "2024-05-60 12:00:00" and date2: "2024-05-07 09:58:00" is it possible to calculate the difference in hh:mm between those two datetimes?

 

I have a formula called seconds

 

DateTimeDiff([date2],[date1],"seconds")

 

and a formula that converts that to hh:mm 

 

DateTimeAdd("1900-01-01",[seconds],"seconds")

 

however, I don't think that this method works when working with datetimes over 24 hours, my example dates are under 24 hours and it still doesn't work, I'm assuming because it's on different days?

 

if so is it possible to calculate the difference between the 2 dates in my use case?

 

 

2 REPLIES 2
binuacs
20 - Arcturus

@AbdulBalogun what is the difference are you seeing in the above calculation

image.png

markcurry
12 - Quasar

hi @AbdulBalogun 

 

I don't see anything wrong with your formula, and see the attached workflow.  Is this what you're after?   Or do you want it to add a new day after midnight?

 

 

Labels