Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
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

binuacs
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