WEEKNUM function

WEEKNUM(date, returnType?) WEEKNUM(date; returnType?)

date — Number or { Number }

The date as a sequential serial number.

returnType — Number or { Number } (optional)

A number which determines on which day the week begins. It also specifies how the weeks are numbered. If it is 21, ISO 8601 is followed, otherwise, the week containing January 1 is the first week of the year and gets assigned the number 1. If omitted, the parameter is assumed to be 1, meaning that weeks start on Sundays and that ISO 8601 is not followed. (Refer to the table for more information.)

Returns — Number or { Number }

The week number of the date (1 through 52).

Converts a date to a number representing the week number of the date.

The meaning of the return value varies depending on the returnType parameter. To get a return value conforming to ISO standards, either use the ISOWEEKNUM function or set the parameter to 21. Refer to this table for more information:

Valid values for the returnType parameter
Value Day week begins on
1 (default) Sunday
2 Monday
11 Monday
12 Tuesday
13 Wednesday
14 Thursday
15 Friday
16 Saturday
17 Sunday
21 Monday

Examples

WEEKNUM(DATE(2008, 1, 1))WEEKNUM(DATE(2008; 1; 1))

Returns 1.

WEEKNUM(DATE(2008, 12, 24))WEEKNUM(DATE(2008; 12; 24))

Returns 52.