Alteryx Designer Desktop Discussions

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

DateTimeDiff produces negative days

pvara
Astéroïde

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

2 RÉPONSES 2
CharlieS
17 - Castor
17 - Castor

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'))

pvara
Astéroïde

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

Étiquettes