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

Alteryx designer Discussions

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

DateTimeDiff produces negative days

Highlighted
Asteroid

when using DateTimeDiff ([End_Date],[Start_Date],'days') for some of my data it results in negative values.

Example

Start_DateEnd_DateResult in Days
2017-03-312014-06-02-1033
2018-01-012018-03-3189

 

is there a workaround for this?

 

Thank you

Pete

Alteryx Certified Partner
Alteryx Certified Partner

If you'd like the absolute value of days, use the "abs(" function. The formula below would produce a value of "1033" for your first record.

 

abs(DateTimeDiff ([End_Date],[Start_Date],'days'))

Asteroid

Thank you Charles it worked like a charm. Your a rock star.

Labels