COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: gatorfe on 06 Jan 2014 02:42:14 PM

Title: Extract Year from Date Field
Post by: gatorfe on 06 Jan 2014 02:42:14 PM
We have a filter on a simple list report to always show the current year data on sales orders coming in.  This is the formula we have on the filter of the list report [Order].[Year] = extract(year,current_date).  This should give us 2014 but now is given us 1 instead.  What do we need to do to show us 2014?  The field is setup as an integer in our sql dw.  Thanks in advance for any suggestions.
Title: Re: Extract Year from Date Field
Post by: HDA on 06 Jan 2014 03:58:11 PM
Try this...  [Order].[Year] = year(current_date)