0% found this document useful (0 votes)
65 views1 page

Last Day Function

The LAST_DAY function in Oracle/PLSQL returns the last day of the month for a given date value. The syntax is LAST_DAY(date) where date is the input date. For example, LAST_DAY(TO_DATE('2003/03/15', 'yyyy/mm/dd')) would return March 31, 2003 as the last day of that month.

Uploaded by

1raju1234
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
65 views1 page

Last Day Function

The LAST_DAY function in Oracle/PLSQL returns the last day of the month for a given date value. The syntax is LAST_DAY(date) where date is the input date. For example, LAST_DAY(TO_DATE('2003/03/15', 'yyyy/mm/dd')) would return March 31, 2003 as the last day of that month.

Uploaded by

1raju1234
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Oracle/PLSQL: 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

Oracle 12c, Oracle 11g, Oracle 10g, Oracle 9i, Oracle 8i

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

You might also like