If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Week OF as a Date

Started by kennedto, 12 Feb 2016 09:26:44 AM

Previous topic - Next topic

kennedto

I am using Cognos 10.2 with DB2

I would like to get the beginning day of the week for a date.  I tried this, but it says:
This give:
[BusinessView].[DELTICKET].[Start Date]-dayofweek( [BusinessView].[DELTICKET].[Start Date]) days

gives this error:
V5 syntax error found for data item 'Week Of' of query 'Query1', invalid token "days" found after "[BusinessView].[DELTICKET].[Start Date]-dayofweek( [BusinessView].[DELTICKET].[Start Date]) ".

However, this
[BusinessView].[DELTICKET].[Start Date]-1 days

Runs without error.

Only difference is -dayofweek function for the desired date.
Any idea what I am doing wrong here.

Lynn

Try using the add days function:


_add_days ( [BusinessView].[DELTICKET].[Start Date], ( _day_of_week ( [BusinessView].[DELTICKET].[Start Date] * -1 ) )

kennedto