DAY or DAYOFMONTH

Returns the day part of a value. The argument for DAY must be a date, timestamp, date duration, or timestamp duration. The argument for DAYOFMONTH must be a date or timestamp.

Example:

Assume that the column DATE1 (date) has an internal value equivalent to 2000-03-15 and the column DATE2 (date) has an internal value equivalent to 1999-12-31.

       DAY(DATE1 - DATE2)

Results in the value 15.