COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Topic started by: newyork66 on 13 Nov 2007 03:46:31 PM

Poll
Question: Group By Date ( Year Month) in Cognos 8 Report Studio
Option 1: ? votes: 0
Option 2: ? votes: 1
Title: Group By Date ( Year Month) in Cognos 8 Report Studio
Post by: newyork66 on 13 Nov 2007 03:46:31 PM
I have a date field, it's format in DB like this 'mm/dd/yyyy'. How do I group by by YEAR -Month in Report Studio?
Title: Re: Group By Date ( Year Month) in Cognos 8 Report Studio
Post by: MFGF on 13 Nov 2007 04:51:59 PM
Hi,

Add two query calculations
extract([yourdateitem],year)
extract([yourdateitem],month)
Then group on these calculations.

Regards,

MF.
Title: Re: Group By Date ( Year Month) in Cognos 8 Report Studio
Post by: newyork66 on 14 Nov 2007 11:07:03 AM
 :D Great it works. Thank you!