Finding the Last Day of the Month Starting Summer : LAST_DAY « Date Timestamp Functions « Oracle PL/SQL Tutorial






SQL> SELECT TO_CHAR(LAST_DAY('30-JUN-99'),'MM/DD/YYYY HH:MM:SS AM') "Last_Day"
  2   from DUAL;

Last_Day
----------------------
06/30/1999 12:06:00 AM

SQL>








13.8.LAST_DAY
13.8.1.The LAST_DAY function returns the last day of any month
13.8.2.SELECT LAST_DAY('01-JAN-2005') FROM dual;
13.8.3.Finding the Last Day of the Month Starting Summer
13.8.4.Calculating the Number of Days of Summer in June
13.8.5.LAST_DAY(column value)+1
13.8.6.Combine LAST_DAY and ADD_MONTHS together