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

Alteryx designer Discussions

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

The highly anticipated Alteryx Community tradition is back! We hope you'll join us!

Learn More
We will be upgrading the Gallery to our 2019.4 release this Saturday, December 7th beginning at 9:00am MT. We expect the outage to take last approx. 2.5 hours.
SOLVED

DateTimeDiff produces negative days

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