[Table of Contents] [docx version]
SpreadsheetML Reference Material - Table of Contents
WEEKDAY ( serial-value [ , weekday-start-flag ] )
Description: Computes the weekday number for the date having the given serial-value, taking into account the current date base value and weekday-start-flag, if present. See §3.17.4.1 for special handling of certain days in 1900.
Arguments:
Name |
Type |
Description | ||||||||
serial-value |
number |
The date whose weekday number is to be computed. The value of serial-value is truncated to an integer. | ||||||||
weekday-start-flag |
number |
When truncated to integer, indicates the weekday numbering convention to be used, as follows:
|
Return Type and Value: number – The weekday number for the date having the given serial value.
However, if
• serial-value is out of range for the current date base value, #NUM! is returned.
• weekday-start-flag is out of the range specified in the table above, #NUM! is returned.
[Example:
WEEKDAY(DATE(2006,2,1)) results in 4 (Wednesday)
WEEKDAY(DATE(2006,2,1),1) results in 4 (Wednesday)
WEEKDAY(DATE(2006,2,1),2) results in 3 (Wednesday)
WEEKDAY(DATE(2006,2,1),3) results in 2 (Wednesday)
end example]