Alteryx Designer Desktop Discussions

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

Calculate time difference between dates

mzsweetumz
8 - Asteroid

TiffanyLy27_0-1663004273570.png

 

I would like to create a new column to calculate with row has an admit date and discharge date of less than 24 hours.

 

Any help would be appreciated!

 

Thank you!

 

3 REPLIES 3
BrandonB
Alteryx
Alteryx

https://help.alteryx.com/20221/designer/datetime-functions 

 

This is a very helpful link for datetime functions. You will be particularly interested in DateTimeDiff()

 

IF DateTimeDiff([Discharge Date], [Admit Date], "Hours") <24

THEN "Yes"

ELSE "No"

ENDIF

binuacs
20 - Arcturus

@mzsweetumz similar to @BrandonB suggestion

 

binuacs_0-1663019718298.png

 

Qiu
20 - Arcturus
20 - Arcturus

@mzsweetumz 
Just play around with the formula. we can use also the DateTimeadd, to add 24 hours to the Admin Date then check.

0913-TiffanyLy27.PNG

Labels