Home Privacy Policy Feedback Link to us Site Map Forums

Oracle/PLSQL: Last_Day Function


In Oracle/PLSQL, the last_day function returns the last day of the month based on a date value.

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:

  • Oracle 8i, Oracle 9i, Oracle 10g, Oracle 11g

For example:

last_day(to_date('2003/03/15', 'yyyy/mm/dd')) would return Mar 31, 2003
last_day(to_date('2003/02/03', 'yyyy/mm/dd')) would return Feb 28, 2003
last_day(to_date('2004/02/03', 'yyyy/mm/dd')) would return Feb 29, 2004