WeekDay and
DayOfWeek are equivalent functions.
Description
WeekDay returns a number n which is the nth day of the week given a Date or DateTime value.
Overloads
WeekDay (date, firstDayOfWeek)
Arguments
date is a Date or DateTime value for which a numeric designation for the day of the week is to be returned.
firstDayOfWeek is an optional Number indicating the first day of the week. For more information, see
DayOfWeek. If not specified, Sunday is assumed.
Action
WeekDay returns a number n which is the nth day of the week given a Date or DateTime value.
Typical use
WeekDay is often useful in performing date computations that take into account special days of the week such as weekends. See the
DateSerial (year, month, day) examples section for some examples.
Examples
WeekDay (#Oct. 4, 1999#)
Returns 2 since Oct. 4, 1999 is a Monday, and the first day of the week is assumed to be Sunday.
WeekDay (#Oct. 4, 1999#, crMonday)
Returns 1 since Oct. 4, 1999 is a Monday, and the first day of the week is specified to be Monday.