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

day_of_week - changing the starting day

Started by ITEvilWoman, 16 Jun 2016 10:37:13 AM

Previous topic - Next topic

ITEvilWoman

Hi All, We have a very strange thing going on at the moment. When using the day of week function without accessing any reporting package it returns the correct number but when we pull in a filter from any of the packages created from a specific framework it starts returning the wrong number. So today (16-06-2016) is returning 4 correctly but when we use a filter/item from this particular framework it's returning 2. I was wondering if there was anything that could possibly be set as a governor or a setting in the framework that might cause this.

Lynn

Take a look at the generated SQL in the various situations to see if the day of week is coming from the Cognos server via local processing or if your database is performing the function and returning the result. I tend to think the database is always the beast that ultimately returns that information but there are many DBMS vendors out there so I can't speak for all and you didn't mention what your environment uses.

If you login to your database directly with a SQL client tool of some sort you can try the equivalent day of week function and also get the current date according to that database to see if the DBA perhaps needs to get things in shape on the database side.

Lynn

I assume you know that there is a parameter in the day of week function that allows you to set the starting day as desired so you could model it differently for different packages.

You are posting on the Framework Manager board but your question seems more like something to do with Report Studio. 



_day_of_week ( date_expression, integer )
Returns the day of week (1 to 7), where 1 is the first day of the week as indicated by the second parameter (1 to 7, 1 being Monday and 7 being Sunday). Note that in ISO 8601 standard, a week begins with Monday being day 1.