COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: raghu on 19 Oct 2007 06:12:16 AM

Title: difference between dates
Post by: raghu on 19 Oct 2007 06:12:16 AM
hi ,
i want to display the difference between to dates(that should be number).
i used _days_between function......but it is throwing an error (RSV-SRV-0040 )...please help me to suit out this error
Title: Re: difference between dates
Post by: rockytopmark on 19 Oct 2007 07:01:07 AM
"i used _days_between function"
Well, that certainly is the function you need to use.

You should send the syntax you tried, and the resulting error, in order for us to be able to see what you might have wrong. 

Also, make sure you are comparing actual date data types with this function.  If your "Dates" are really number that is a reason to get an error.  If they are not dates, you will need to convert them to dates first, then wrap the days_between function around them.
Title: Re: difference between dates
Post by: Suraj on 19 Oct 2007 12:33:45 PM
You may have to cast the dates before you use _days_between function as it only looks for date/time formats to do the calculation.