COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: cognos_guru on 23 Nov 2009 02:28:11 PM

Title: Using the Oracle ROUND function with dates
Post by: cognos_guru on 23 Nov 2009 02:28:11 PM
Does anyone know if Cognos supports using the oracle round function with a date?  I tried adding a custom data item as follows:

round ([DATE], 'YEAR')

.. but I keep getting an error.  The tips only show rounding to an integer value.
Title: Re: Using the Oracle ROUND function with dates
Post by: jmwhite on 24 Nov 2009 11:33:17 AM
Have you tried using the EXTRACT function instead?
Title: Re: Using the Oracle ROUND function with dates
Post by: imts on 25 Nov 2009 03:17:04 AM
U can use - Extract ( date_name , Year ) or to_char( dat_name , 'YYYY') .

-Tarun
Title: Re: Using the Oracle ROUND function with dates
Post by: cognos_guru on 15 Jan 2010 02:09:16 PM
That's what I ended up using - thanks!