DATE

Restriction: This topic applies to Windows environments only.
ANSI DB2 SQL/DS XDB
  X   X

The DATE function is used to convert a value into a date. The format appears below:

DATE(expres)

The parameter expres can be a character string, a timestamp, a date, a positive number less than 3,652,059, or a null value. If expres is a date, the result is the date. If expres is a timestamp, the result is the date portion of the timestamp. If expres is a character string, it must be in one of the following formats that XDB Server recognizes:

yyyy-mm-dd ISO or JIS format.
mm/dd/yyyy USA format.
dd.mm.yyyy EUR format.

If expres is a number, the result is the number of days since January 1, 0001 (including January 1, 0001). An example of the DATE function is:

UPDATE orders
  SET o_date = DATE("1989245")
  WHERE o_no = 5