SYMPTOM:
In a Strategy environment with IBM DB2 as the Warehouse Database, a date attribute is created and defined using an ApplySimple statement containing the function 'CHAR' having 'LOCAL' as argument (which is a DB2 native syntax), as in the example:
ApplySimple('CHAR(#0,LOCAL)'; )
In DB2, the CHAR function is used to convert different data types into 'Character'. Among other things, it allows converting a datetime expression into characters; in this case, several arguments can be used to specify the date format to be used:
ISO -+ yyyy-mm-dd -+ International Standards Organization
USA -+ mm/dd/yyyy -+ the IBM standard for U.S. date and time format
EUR -+ dd.mm.yyyy -+ the IBM standard for Europe date and time format
JIS -+ yyyy-mm-dd -+ the date and time format of the Japanese Industrial Standard
LOCAL -+ Locally defined layout: Use the date and time format in local form associated with the territory code of the database
That is, the LOCAL argument converts a date to a given format according to the Locale of the machine where the DB2 client is installed, not the DB2 database server.
When a SQL query including the LOCAL argument is run against a DB2 database using the Strategy ODBC Driver for DB2 Wire Protocol, the results are displayed in a MM-DD-YYYY format, independently of the client Locale.
CAUSE:
The Strategy ODBC drivers are client-independent. Therefore, in this case the driver evaluates the LOCAL argument as the default Locale, this is USA, instead of the client Locale.
ACTION:
It is often good practice to use client-independent SQL syntax. Consider an alternative SQL syntax returning the desired format while being client-independent.
Third Party Software Installation:
WARNING:
The third-party product(s) discussed in this technical note is manufactured by vendors independent of Strategy. Strategy makes no warranty, express, implied or otherwise, regarding this product, including its performance or reliability.