WEEKNUM(serial_number, [return_type])
=WEEKNUM("31-Dec-2020")
The WEEKNUM function is used to determine the week number in a given year. In the example above, the output is the value 53, indicating that December 31st falls on the 53rd week of 2020.
=WEEKNUM("1-Jan-2021")
The WEEKNUMfunction is also used to determine the week number of the year that a given date falls on. In the example above, the output is the value 1, indicating that January 1st falls on the first week of 2021.
=WEEKNUM("31-Dec-2020") - WEEKNUM("1-Jan-2021")
The WEEKNUM function is used to compare two different dates to determine how many weeks there are between them. The example above would return the value 52, indicating that there are 52 weeks between December 31st, 2020 and January 1st, 2021.
=WEEKNUM("1-Jan-2021") - WEEKNUM("1-Jan-2020")
The WEEKNUM function can also be used to compare the same date in two different years. This example would return the value 53, indicating that there are 53 weeks between January 1st, 2020 and January 1st, 2021.
The WEEKNUM function returns the week number of a given date as a number, following ISO 8601 standards. The date argument is required and the return type argument is optional.