COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Framework Manager => Topic started by: satay2hot on 24 Jun 2012 05:25:22 AM

Title: How to filter out the year inside current_date
Post by: satay2hot on 24 Jun 2012 05:25:22 AM
Hi I have been trying to crack my head trying to get the current_date in framework manager only to extract the year portion. Will be nice to filter out the month too.
Title: Re: How to filter out the year inside current_date
Post by: satay2hot on 24 Jun 2012 05:31:37 AM
dont worry just found

extract(year,current_date)
extract(month,current_date)


thanks for helping
Title: Re: How to filter out the year inside current_date
Post by: blom0344 on 25 Jun 2012 02:01:46 AM
If you want an unique key for period, then define:

extract(year,current_date)*100+extract(month,current_date)

i.e.:  201206