Hi all
I have 2 dates that I am subtracting from one another to get a date difference: My expression is: current_date -[DUE_DATE] this gives me the correct result but its an interval like "5 Days"
I want to remove the Days and just get the number eg: "5 Days" --> "5"
I tried the day function but it's not supported, also tried cast to integer and im not getting good results.
Any idea?
Quote from: krevix on 03 Aug 2023 06:02:39 AM
Hi all
I have 2 dates that I am subtracting from one another to get a date difference: My expression is: current_date -[DUE_DATE] this gives me the correct result but its an interval like "5 Days"
I want to remove the Days and just get the number eg: "5 Days" --> "5"
I tried the day function but it's not supported, also tried cast to integer and im not getting good results.
Any idea?
Hi,
There is a Cognos function _days_between() that returns the difference in days between two dates.
_days_between(current_date, [DUE_DATE])
Cheers!
MF.