0

I've a doubt about session-level date format in DB2. I'm doing a migration project from Oracle to DB2 and I came across with a procedure in oracle that is using "alter session set nls_date_format = 'yyyymmdd'", when I execute this, the session that I am will set dateformat from all querys to '20191015' (for examples, based on yyyymmdd format.).

How can I do this in DB2 11.0?

  • Is this DB2 for Z/OS or Db2 for Linux, Unix and Windows? – Mark Barinstein Oct 15 '19 at 20:21
  • 1
    .... Anything setting the session state is _probably_ brittle. If there's any parsing/formatting code that depends on this far away from the set point, it may get missed at some point. Or there may be multiple procedures that attempt to set the format. Would it be permissible to change whatever calls this procedure to explicitly use the format string during printing/parsing? – Clockwork-Muse Oct 15 '19 at 21:20
  • Mark, this is Z/OS – Talita Tiense Oct 16 '19 at 12:34

0 Answers0