ISOWEEK (ISO week number)

<< Click to Display Table of Contents >>

ISOWEEK (ISO week number)

Syntax:

ISOWEEK(Date [, ReturnYear])

Description:

This 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. On the contrary, it is based on the ISO standard 8601, which is binding in Germany, Austria and Switzerland, among other countries. It specifies the following:

1. Weeks always start on a Monday (not Sunday).

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

Note:

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

For this reason, the ISOWEEK function has an additional parameter named ReturnYear, which has the following effect:

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 (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 does not exist in Microsoft Excel. If you save a document in Excel format, all calculations using this function will be replaced with their current result as a fixed value.

Tip: As an alternative to this function, you can use the Excel-compatible ISOWEEKNUM function. It returns exactly the same results, but it does not have the optional parameter for displaying the year.

See also:

ISOWEEKNUM, WEEKNUM, YEAR, MONTH, DAY, WEEKDAY