COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: anuj.kulshreshtha on 30 Jan 2014 03:28:12 AM

Title: Start day of week in cognos 8
Post by: anuj.kulshreshtha on 30 Jan 2014 03:28:12 AM
Hi all,

I am using a date as a prompt in my report and I am displaying parameter value on report page.
I want another date to be displayed on report page based on my prompt value and that date should be START DATE OF THE WEEK (SUNDAY) and also i need to add some days to this date

Please help me guys asap.

Thanks
Title: Re: Start day of week in cognos 8
Post by: nblank on 30 Jan 2014 06:28:28 AM
Hi,

I used this expression in a report to get the monday of current_date:

_add_days (
current_date ;
((_day_of_week (current_date ; 1)*-1)+1)
)

Perhaps remove the +1 to get sunday.

Greetings,

Nanno