The NEXT_DAY function returns the date of the first occurrence of the given day that is strictly later than the given date.

You must specify at least the first three letters of the day, for example, SAT. If the given date contains a time portion, the time portion is carried forward without changing the result.

The following is an example of the NEXT_DAY function:

SELECT NEXT_DAY(TO_DATE('13-AUG-07','DD-MON-YY'),'SUNDAY') FROM DUAL;

      next_day
--------------------
 19-AUG-07 00:00:00
(1 row)

SELECT NEXT_DAY(TO_DATE('13-AUG-07','DD-MON-YY'),'MON') FROM DUAL;

      next_day
--------------------
 20-AUG-07 00:00:00
(1 row)