COGNOiSe.com - The IBM Cognos Community

Legacy Business Intelligence => COGNOS ReportNet => Topic started by: otsizh on 07 Oct 2005 10:16:43 AM

Title: [Solved]date operations
Post by: otsizh on 07 Oct 2005 10:16:43 AM
Hi,

What are the available operations for the date type items?
I have a date type item, and I need to extract month, day, year portions...

To do the day portion I can use the function _day_of_year([date])
but what about month, year?

can I substract current date and my item?Ã,  when I do any operations or use functions with "current_date" I have an error.

Thanks, Olha
Title: Re: date operations
Post by: BIsrik on 07 Oct 2005 10:23:49 AM
use extract function...

Srik
Title: Re: date operations
Post by: otsizh on 07 Oct 2005 10:29:17 AM
thanks
Title: Re: [Solved]date operations
Post by: sir_jeroen on 09 Oct 2005 04:32:17 PM
have you also tried datepart({xx};date)Ã,  function? Because I found out that the extract function slowed the query down (but that was on an old database)
Title: Re: [Solved]date operations
Post by: BIsrik on 10 Oct 2005 04:06:20 AM
i think the datepart function is not available in RN. I had the same requirement and i was forced to use the extract function. If any one found any other alternate method plz share with us.

Srik