- Categories:
NEXT_DAY¶
Returns the date of the first specified day of week (DOW) that occurs after the input date.
- See also:
Syntax¶
Arguments¶
date_or_timestamp_exprA date or a timestamp, or an expression that can be evaluated to a date or a timestamp.
dow_stringSpecifies the day of week used to calculate the date for the next day. The value can be a string literal or an expression that returns a string. The string must start with the first two characters (case-insensitive) of the day name:
su(Sunday)mo(Monday)tu(Tuesday)we(Wednesday)th(Thursday)fr(Friday)sa(Saturday)
Any leading spaces and trailing characters, including spaces, in the string are ignored.
Returns¶
This function returns a value of type DATE, even if date_or_timetamp_expr is a timestamp.
Examples¶
Return the date of the next Friday that occurs after the current date:
Your output will be different because the example uses the CURRENT_DATE function.