Quando omni flunkus, mortati. Die dulci fruere.

| Subscribe via RSS

Thursday, February 26, 2009

Using Relative Dates In Business Reporting

| 0 comments

Here's an interesting example / tutorial / technique for using relative dates in Cognos Report Studio as well as the scheduling of such reports. In this example the report administrator would setup a report that would display activity for the past week that would run every Monday morning: Relative Dates In Business Reporting

Examples of relative dates that many organizations might use are activity in the last 7 days, Month to date (MTD), Year to Date (YTD) to name a few.

Wednesday, February 11, 2009

Prompt date formats

| 0 comments

In Cognos, date formats used in prompts are controlled by the locale settings. Although the locales each have their own format for dates you can change the format of the prompt date for your desired locale.

In the directory ...\cognos\c8\webcontent\prompting\res are two files called promptLocale_.js and promptLocale_.xml.

In these files you can see the date formats used for each locale. For example, if you want to use the en-us locale within Cognos 8, and you prefer a different date format for the prompt you can easily edit the promptLocale_en-us.js and promptLocale_en-us.xml files to change the medium date format. Let's say that you prefer to use the date format of yyyy-MM-dd, you'll just need to do the following:

In the promptLocale_en-us.js file,
  • Change the value for g_mediumFormat to this: yyyy-MM-dd h:mm:ss a
  • Change the value for g_mediumFormatDateOrder to this: YMD
  • Change the value for g_monthFormatMedium to this: MM
  • Change the value for g_dayFormatMedium to this: dd
In the promptLocale_en-us.xml file, change the following 4 properties to reflect the changes below:
  • yyyy-MM-dd h:mm:ss a
  • YMD
  • MM
  • dd
Always make sure you backup these files before any changes are made.