
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Days Difference
Hi Community,
I need to get days difference from Date2 and Date1. I simply use Date2-Date1 to get days and now the result is showing like -9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9 and goes till -30 and 30.
Can you please advise if I m using the correct procedure and why the data is coming in this format?
Thanks
Accepted Solutions


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
maybe use
fabs(Date2-Date1) as Duration
to get the duration, undepending on which date is greater.
Regards

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If your Date2 is less than the Date 1 then you will get negative values in days. Probably it could be due to data is wrong.


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
maybe use
fabs(Date2-Date1) as Duration
to get the duration, undepending on which date is greater.
Regards

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Script:
Floor(Num(Date1)) as Date1_Upd,
Floor(Num(Date2)) as Date2_Upd,
Front End:
Count ( Date2_Upd - Date1_Upd)
Thanks,
Usama

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Martin for your assistance
Fabs fuction gave me the result in decimals so I used fabs(round(Date2-Date1)) and its working.
