community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

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

Datetimediff 23.45 - 00.45

Meteoroid
Hi! I'm using the formula DateTimeDiff ([ATA],[STA], "minutes"). When I have for example 18.30 and 18:45 I obtain correctly the difference between two datetime. In this case 15 minutes. If have 23.45 and 00.45 I've like record 1440 about and not 60 minutes. Could you help me please?
Alteryx Certified Partner
Alteryx Certified Partner

Hi @Andrea92 ,

 

I think, if you use the formula on STA = 23:45 and ATA = 00:45, it will return -1380. You have either to include the dates (e.g. STA = 2019-09-30 23:45  and ATA = 2019-10-01 00:45) or to use an IF clause (IF Result < 0 THEN add 1440), based on the assumption, that a negative difference (end time < start time) indicates a day difference.

 

Best regards

 

Roland

Labels