DAYS

Returns an integer representation of a date. The argument must be a date, a timestamp, or a valid string representation of a date.

Example:

Using the PROJECT table, return the number of elapsed days (PRENDATE - PRSTDATE) estimated for the project (PROJNO) 'IF2000'.

       SELECT DAYS(PRENDATE) - DAYS(PRSTDATE)
         FROM PROJECT
         WHERE PROJNO = 'IF2000'

Returns 396 when using the sample table.