Community Halloween is live until October 31st! Complete any 2 quick activities to earn the 2025 Community Halloween badge. Feeling brave? Check out the activities here
Start Free Trial

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

binu_acs
21 - Polaris

@mzsweetumz similar to @BrandonB suggestion

 

binuacs_0-1663019718298.png

 

Qiu
21 - Polaris
21 - Polaris

@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
Top Solution Authors