Alteryx Designer Desktop Discussions

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

Need help on DatetimeDifference

Pinky
8 - Asteroid

Hi,

 

I am using the below formula to calculate the Date difference.

DateTimeDiff(DateTimeParse([Max_DateTime_Out],"%y/%m/%d %H:%M:%S"),DateTimeParse([Min_DateTime_Out],"%y/%m/%d %H:%M:%S"),"Seconds").

 

The formula is only subtracting minutes not seconds. If you see the below data first incident number dates difference is showing zero where as it should show 16 seconds. I have tried using "seconds" and "Minutes" in formula but still the date differenec is Zero. I want to subtract the seconds even the hour and minute is same.

Can i know where am i doing wrong? Thanks!

 

Incident NumberPriorityMax_DateTime_OutMin_DateTime_OutDateDiff
INC000018021039Low02/23/2018 19:28:4102/23/2018 19:28:250
INC000018021096Low02/23/2018 20:50:1402/23/2018 20:45:575
INC000018021284Medium02/24/2018 0:38:1402/24/2018 0:35:003
1 REPLY 1
LordNeilLord
15 - Aurora

Hey @Pinky

 

Try this:

 

DateTimeDiff(DateTimeParse([Max_DateTime_Out],
"%m/%d/%Y %H:%M:%S"),
DateTimeParse([Min_DateTime_Out],
"%m/%d/%Y %H:%M:%S"),"Seconds")

secdiff.PNG

Labels