COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Framework Manager => Topic started by: gosoccer on 06 Jul 2016 11:40:06 AM

Title: Using Varchar Converted Date to have a last month Filteration
Post by: gosoccer on 06 Jul 2016 11:40:06 AM
Hi everyone, :) :)

I'm trying to use the following to get the last month but since it's a DMR Model and I have to have
the date into Character.

[Order date] between _first_of_month(_add_months(current_date,(((intdiv(extract(month,current_date)-1,3) * 3) + 1)-extract(month,current_date)))) and current_date

The problem is I had to change the [Order date] to character in order to Deploy the package and not to get the following error (DMR).

So, now that the date is in varchar, cast([Order date],varchar(12)), how can I can use this date in Report Studio Query
to get the last month using the above Filtration?

Thx so much, 8) 8)

Title: Re: Using Varchar Converted Date to have a last month Filteration
Post by: bus_pass_man on 08 Jul 2016 06:47:55 PM
Hopefully the answer in http://www.cognoise.com/index.php/topic,31064.0.html will solve this problem.  Have separate attributes for your key and member captions.