NextWeekdayFromDate function

Returns the date of the specified day of the week soonest after the source date. The day of the week is specified as the full name, for example, thursday, or a three-letter abbreviation, for example, mon.

Namespace

datetime

Input

source date(date|string), day of the week(int|string)

Output

date(date)

Example

If sourcedate contains the time 2008-08-18 and the day of the week that is specified is Thursday contained in dayofweek, then the two following functions are equivalent, and return the value 8:

set-column result datetime:NextWeekdayFromDate('2008-08-18', 'thursday') set-column result datetime:NextWeekdayFromDate('2008-08-18', 'thu') set-column result datetime:NextWeekdayFromDate(basedate, 'thursday') set-column result datetime:NextWeekdayFromDate(basedate, dayofweek)



Created in 2020 by Google Inc.