Return to Snippet

Revision: 71260
at January 31, 2017 06:20 by bbrumm


Initial Code
--Example 1
SELECT SYSDATE, 
LAST_DAY(SYSDATE) AS lastday_test
FROM dual;

--Example 2
SELECT LAST_DAY('10-JAN-2016') AS lastday_test
FROM dual;

--Example 3
SELECT SYSDATE, 
LAST_DAY(ADD_MONTHS(SYSDATE, 5)) AS lastday_test
FROM dual;

--Example 4
SELECT SYSDATE, 
LAST_DAY(ADD_MONTHS(SYSDATE, -1)) AS lastday_test
FROM dual;

Initial URL
http://www.databasestar.com/oracle-last_day/

Initial Description
A few examples of the Oracle LAST_DAY function.

Initial Title
Oracle LAST_DAY Function

Initial Tags
sql, Oracle

Initial Language
SQL