• Home
  • WEEKNUM Function

WEEKNUM Function

The WEEKNUM function is one of the date and time functions. It used to return the number of the week the specified date falls within the year.

Syntax

WEEKNUM(serial_number, [return_type])

The WEEKNUM function has the following arguments:

ArgumentDescription
serial_numberA number representing the date within the week, entered using the DATE function or other date and time function.
return_typeA numeric value used to determine on which day the week begins. The possible values are listed in the table below.

The return_type argument can be one of the following:

Numeric valueWeek begins onSystem
1 or omittedSunday1
2Monday1
11Monday1
12Tuesday1
13Wednesday1
14Thursday1
15Friday1
16Saturday1
17Sunday1
21Monday2
Notes

When return_type is set to 1-17, System 1 is used. This means that the first week in a year is the week that contains January 1.

When return_type is set to 21, System 2 is used. This means that the first week in a year is the week that contains the first Thursday of the year. System 2 is commonly used in Europe according to the ISO 8601 standard.

How to apply the WEEKNUM function.

Examples

The figure below displays the result returned by the WEEKNUM function.

WEEKNUM Function

Host ONLYOFFICE Docs on your own server or use it in the cloud

Article with the tag:
Browse all tags