NEXT_DAY

The NEXT_DAY function returns the date of the first instance of a particular day of the week that follows the specified date.

Return Value

DATETIME

Syntax

NEXT_DAY(datetime-expression, weekday)

Parameters

datetime-expression

An expression that has the DATETIME data type.

weekday

A text expression that identifies a day of the week (for example, Monday). Valid names are controlled by the NLS_DATE_LANGUAGE option.

Examples

Example 8-35 Getting a Future Date

The following statement returns the date of the first Tuesday following today's date.

SHOW NEXT_DAY(SYSDATE, 'Tues')

When today is Friday, September 8, 2000, then the following Tuesday is

11-SEP-00