DB2 Version 9.7 for Linux, UNIX, and Windows

LAST_DAY scalar function

Read syntax diagramSkip visual syntax diagram
>>-LAST_DAY--(--expression--)----------------------------------><

The schema is SYSIBM.

The LAST_DAY scalar function returns a datetime value that represents the last day of the month of the argument.

expression
An expression that specifies the starting date. The expression must return a value of one of the following built-in data types: a DATE or a TIMESTAMP.

The result of the function has the same data type as expression, unless expression is a string, in which case the result data type is DATE. The result can be null; if the value of date-expression is null, the result is the null value.

Any hours, minutes, seconds or fractional seconds information included in expression is not changed by the function.

Examples