Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
maybe use
fabs(Date2-Date1) as Duration
to get the duration, undepending on which date is greater.
Regards
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.
maybe use
fabs(Date2-Date1) as Duration
to get the duration, undepending on which date is greater.
Regards
Hi,
Script:
Floor(Num(Date1)) as Date1_Upd,
Floor(Num(Date2)) as Date2_Upd,
Front End:
Count ( Date2_Upd - Date1_Upd)
Thanks,
Usama
Thanks Martin for your assistance
Fabs fuction gave me the result in decimals so I used fabs(round(Date2-Date1)) and its working.