COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: Sakthi on 06 Sep 2012 09:16:41 AM

Title: Need Help on increment of date
Post by: Sakthi on 06 Sep 2012 09:16:41 AM
Hi,

I am struck with an issue on a date column. Below is the scenario, helpme out pls.

I have 3 report columns namely, Enroll Date,deadline date and date difference.
Enroll date is the date which is available in the query subject.
deadline date is enroll date + 90 days (not sure how to implement)
date difference is system date - enroll date..

Kindly help me out to implement this.

PS - Enroll date is a varchar data type.
Title: Re: Need Help on increment of date
Post by: Lynn on 06 Sep 2012 10:45:58 AM
You will need to convert the varchar field containing enroll date to a date data type. Take a look at the cast function. Whoever did your FM model could have taken care of this so all report authors wouldn't need to implement that functionality. Even better would have been for the database design to use a date data type for dates!

Once you convert your enroll date to a date data type you can use the _add_days function and the _days_between function to meet your requirements.