SOLVED
DateTimeDiff produces negative days
Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
pvara
8 - Asteroid
‎05-23-2018
02:02 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
when using DateTimeDiff ([End_Date],[Start_Date],'days') for some of my data it results in negative values.
Example
Start_Date | End_Date | Result in Days |
2017-03-31 | 2014-06-02 | -1033 |
2018-01-01 | 2018-03-31 | 89 |
is there a workaround for this?
Thank you
Pete
Solved! Go to Solution.
Labels:
- Labels:
- Date Time
- Expression
2 REPLIES 2
17 - Castor
‎05-23-2018
02:14 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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'))
‎05-23-2018
02:18 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thank you Charles it worked like a charm. Your a rock star.
