WEEKDAY

Syntax:

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:

Value

Meaning

1 or omitted

1 (Sunday) through 7 (Saturday)

2

1 (Monday) through 7 (Sunday)

3

0 (Monday) through 6 (Sunday)

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: