Description
Returns the day of the week that corresponds to the supplied date. The optional parameter allows you to specify either Sunday or Monday as the first day of the week.
Syntax
WEEKDAY ( number, [return_type] )
Parameter | Description |
---|---|
number | A date represented as:
|
return_type |
(Optional) The first day of the week. Possible values are:
|
Remarks
WEEKDAY returns a number ranging from 1 (Sunday) to 7 (Saturday).
Examples
This function returns 1, indicating Sunday:
WEEKDAY(41322)
This function returns 3, indicating Tuesday:
WEEKDAY("03/20/12", 1)
See also