ISOWEEK (ISO week number)

<< Click to Display Table of Contents >>

ISOWEEK (ISO week number)

Syntax:

ISOWEEK(Date [, ReturnYear])

Description:

Returns the ISO week number of a date (i.e. the week number according to the ISO 8601 standard).

Unlike the WEEKNUM function, this function does not use the calculation method commonly used in the USA and many other parts of the world. Rather, it is based on the ISO standard 8601, which is binding in Germany, Austria and Switzerland, among others. It specifies the following:

1. Weeks start on Monday (not Sunday).

2. The first week of a year is defined as the week that contains January 4th.

Note:

This may lead to situations where December 29, 30 and 31 are considered part of the first week of the next year – or where January 1, 2 and 3 are considered part of the last week of the previous year.

For this reason, ISOWEEK has an additional parameter named ReturnYear which leads to the following results:

If set to 0 or omitted, the function returns the week number.

If set to 1, the function instead returns the year to which the date belongs to (according to the ISO 8601 standard). See examples below.

Example:

ISOWEEK("01/01/2020") returns 1.

ISOWEEK("01/01/2017") returns 52 (since this day was a Sunday).

ISOWEEK("01/01/2017", 1) accordingly returns 2016 – not 2017.

Compatibility notes:

This function is not supported by Microsoft Excel. If you save a document in Excel format, all calculations using this function will be replaced by their last result as a fixed value.

Tip: There's an Excel-compatible alternative to this function: the ISOWEEKNUM function. It returns exactly the same results, but does not have the optional parameter for displaying the year.

See also:

ISOWEEKNUM, WEEKNUM, YEAR, MONTH, DAY, WEEKDAY