NEXT_DAY Date function in oracle

By Santhosh N

This explains how to get the next weekday name’s date from the specified date.

There is function by the name, NEXT_DAY which is used to know the date of the next weekday from the specified date.

Syntax: NEXT_DAY(date, WeekDayName)
Here, date is the date from which the next date needs to be calculated, and WeekDayName is the name of the week day, the allowed week day names are SUNDAY, MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY

Ex1: SELECT NEXT_DAY('01-may-10','SUNDAY') FROM dual;
This returns “5/2/2010”

Ex2: SELECT NEXT_DAY('01-may-10','TUESDAY') FROM dual;
This returns “5/4/2010”

Related FAQs

This explains how to convert the date and time from one time zone to other and return the equivalent time to desired time zone.
This explains the difference between two oracle date functions namely LOCALTIMESTAMP and CURRENT_TIMESTAMP.
This explains how to get the current date and time in the time zone of the current SQL session which is set by the Alter session command.
This explains how to convert the timestamp value to the timestamp with time zone in oracle.
This explains how to get the Database Time zone information that is set to the current session.
This explains how to get the current date and time along with the time zone that is set for the session.
NEXT_DAY Date function in oracle  (2212 Views)