COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: allnutt16 on 23 Sep 2014 12:11:12 PM

Title: Changing start date for _day_of_year
Post by: allnutt16 on 23 Sep 2014 12:11:12 PM
Is there a way I can change the start date for when the count on _day_of_year begins?  The default is to start at Jan-1 but my client has a fiscal year beginning of July-1.

TIA
Title: Re: Changing start date for _day_of_year
Post by: Francis aka khayman on 23 Sep 2014 09:04:18 PM
use add_months function
Title: Re: Changing start date for _day_of_year
Post by: allnutt16 on 24 Sep 2014 03:48:19 PM
can you elaborate a little bit? Do I need to create a separate data item for the add_months function or do I somehow incorporate it into my _day_of_year function?
Title: Re: Changing start date for _day_of_year
Post by: Francis aka khayman on 25 Sep 2014 02:47:22 AM
Ok for example today is July 2. Your start of year is July 1 so your _day_of_year should be 2 right? But because the count starts at Jan 1, the actual result is 7months + 2 days.

So why not July 2 - 7 months = Jan 2, then do the _day_of_year function?