NEXT_DAY Function | SQL Date/Time Functions & Expressions | Teradata Vantage - 17.00 - 17.05 - NEXT_DAY - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - SQL Date and Time Functions and Expressions

Advanced SQL Engine
Teradata Database
Release Number
Release Date
June 2020
Content Type
Programming Reference
Publication ID
English (United States)

Returns the date of the first weekday (day_value) that is later than the date specified by date_timestamp_value.


[TD_SYSFNLIB.] NEXT_DAY ( date_timestamp_value, day_value )
Name of the database where the function is located.
A date or timestamp argument.

A character argument.

day_value can be any day of the week or its 3-character abbreviation.

Valid values are:
  • 'SUNDAY' or 'SUN'
  • 'MONDAY' or 'MON'
  • 'TUESDAY' or 'TUE'
  • 'WEDNESDAY' or 'WED'
  • 'THURSDAY' or 'THU'
  • 'FRIDAY' or 'FRI'
  • 'SATURDAY' or 'SAT'

The day of week is not case-sensitive. Any characters that follow a valid abbreviation are ignored.

If this syntax element is NULL, NULL is returned.

While all systems are shipped only supporting the above English values for day_value, the Database Administrator can extend valid values to properly handle localized day names by including them in the ShortDays or LongDays of the Specification for Data Formatting (SDF) file supplied to the tdlocaledef utility.