Last Day Function
Last Day Function
In Oracle/PLSQL, the LAST_DAY function returns the last day of the month based on a date value.
Syntax
The syntax for the LAST_DAY function is: LAST_DAY( date ) date is the date value to use to calculate the last day of the month.
Applies To
For Example
The LAST_DAY function can be used in Oracle/PLSQL. For example: LAST_DAY(TO_DATE('2003/03/15', 'yyyy/mm/dd')) LAST_DAY(TO_DATE('2003/02/03', 'yyyy/mm/dd')) LAST_DAY(TO_DATE('2004/02/03', 'yyyy/mm/dd')) would return Mar 31, 2003 would return Feb 28, 2003 would return Feb 29, 2004