/ Published in: SQL
A few examples of the Oracle LAST_DAY function.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
--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;
URL: http://www.databasestar.com/oracle-last_day/