Try OpenEdge Now
skip to main content
SQL Reference
SQL Reference : OpenEdge SQL Functions : NEXT_DAY
 

NEXT_DAY

Returns the minimum date that is greater than the date corresponding to the first argument where the day of the week is the same as that specified by the second argument.

Syntax

NEXT_DAY ( date_expression, day_of_week )

Notes

*The first argument to the function must be of type DATE.
*The second argument to the function must be of type CHARACTER. The result of the second argument must be a valid day of the week (‘SUNDAY', ‘MONDAY' etc.).
*The result is of type DATE.
*If any of the argument expressions evaluate to NULL, the result is NULL.

Example

This example illustrates the NEXT_DAY function:
SELECT NEXT_DAY (order_date, 'MONDAY') FROM orders ;

Compatibility

Progress extension