Translate asOfDate() to user's locale

Hi,

I am new to cognos, I have to transalte date returned by asOfDate() function to user’s locale.
I didnt find anything on google :frowning:

Thanks,
Himanshu

i think it is a server setting… but maybe you can do something with this :-\

Add a Data Format to a Locale

You can modify the cogformat.xml file to add data formats. For example, you may want to add a time format that is not included for your locale.
Valid Syntax

You must use valid syntax when adding a data format.

You can use Report Studio to show you the XML code that you need for a data format. In Report Studio, create a list report that contains the data that you want. Then, select the column and change the Data Format settings in the Report Studio Properties pane to get the format you want. It’s a good idea to run the report to make sure the data format looks the way you want it to. Select View XML and use the same code syntax in the cogformat.xml file. (For an XML file that you can copy and paste from, follow instructions to Open and Save a Report Locally.)

For example, if you want to add a data format for date, create a report that contains a date column. Change the format of the date. Use the appropriate XML code syntax in the cogformat.xml file.

Your syntax might look similar to the bold code shown below:

<dateFormat dateStyle="short" datesSeparator="." Friday, December 19, 2003 19/12/03 19-Dec-03 December 19, 2003

Steps

  1. In the cogformat.xml file, locate the data format for the locale that you want to modify. For example, the following XML code defines time formats for the en-CA (English Canadian) locale:



    1:30 PM
    1:30:55 PM
    1:30:55 EST PM
    1:30:55 o’clock
    PM EST

2.To add another time format, add another XML code line. For example, to add the time format “1:30 EST PM,” add the following line:

  <timeFormat timeStyle="long" showSeconds="false">1:30
  EST PM</timeFormat>
  1. Insert the text that you want to appear in Query Studio into the line you copied and pasted. For example:

    19.12.03