Topic
2 replies Latest Post - ‏2013-03-22T08:25:38Z by juchin
juchin
juchin
8 Posts
ACCEPTED ANSWER

Pinned topic alter session set NLS_TIMESTAMP_FORMAT (migrating from Oracle)

‏2013-03-15T07:07:21Z |
We are migrating from Oracle database and applications(OCI aplications) to DB2 V10 (under Linux).
Our applications include "alter session set NLS_TIMESTAMP_FORMAT = 'YYYYMMDD HH:MT:SS" and "alter session set NLS_TIMESTAMP_T2_FORMAT = 'YYYY/MM/DD HH24:MT:SS" statements. We would like to use diffrent timestamp format each session.
How should we modify our applications?
Thank you for your advice in advance.

Handa
Updated on 2013-03-22T08:25:38Z at 2013-03-22T08:25:38Z by juchin
  • nivanov1
    nivanov1
    22 Posts
    ACCEPTED ANSWER

    Re: alter session set NLS_TIMESTAMP_FORMAT (migrating from Oracle)

    ‏2013-03-15T15:13:24Z  in response to juchin
    You cannot change the way DB2 formats datetime values, apart from using TIMESTAMP_FORMAT() or TO_CHAR(). The server NLS settings will be in effect otherwise. In my view, it's the application client responsibility to format data according to the users' preferences.
    • juchin
      juchin
      8 Posts
      ACCEPTED ANSWER

      Re: alter session set NLS_TIMESTAMP_FORMAT (migrating from Oracle)

      ‏2013-03-22T08:25:38Z  in response to nivanov1
      Thank you for your reply so much.
      We have many SQLs with datetime or timestamp, so we are planning to modify PHP codes which check input data format.