WEEKNUM

Syntax:

WEEKNUM ( serial-value [ , weekday-start-flag ] )

Description: Computes the week number of the date corresponding to serial-value. The week containing January 1 is the first week of the year, and is numbered week 1.

Arguments:

Name

Type

Description

serial-value

number

The date whose week 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 on which the week begins, as follows:

weekday-start-flag

Meaning

1 or omitted

Week begins on Sunday.

2

Week begins on Monday.

Return Type and Value: number – The week number of the date corresponding to 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: