Previous Topic Next topic Print topic


DAYS

ANSI DB2 SQL/DS XDB
  X   X

The DAYS function is used to obtain an integer that corresponds to the number of days between January 1, 0001 and the date in date-expr (including January 1, 0001). The format appears below:

DAYS(date-expr)

The parameter date_expr can be a date, timestamp, or a valid string representation of a date. An example is:

SELECT DAYS(TODAY) - DAYS(o_date)
FROM orders
Previous Topic Next topic Print topic