WEEKNUM

Formulas / WEEKNUM
Determine the week number for a date.
WEEKNUM(serial_number, [return_type])
  • serial_num - a valid date in Sourcetable
  • return_type - [OPTIONAL] argument for the desired return type

Examples

  • =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.

Summary

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.

  • The WEEKNUM function takes a date as its argument, which must be in serial number format.
  • It then returns a week number between 1 and 54, which starts counting from the week that contains January 1.


Frequently Asked Questions

What is the WEEKNUM function?
The WEEKNUM function is a function used to return the week number of a date as a number.
What is the first week of the year in the calendar year?
The first week of the year in the calendar year is numbered as week 1 by ISO 8601.
What argument is required for the WEEKNUM function?
The date argument is required for the WEEKNUM function.
Is there a return type argument for the WEEKNUM function?
Yes, the return type argument is optional for the WEEKNUM function.
What are the different return type options for the WEEKNUM function?
The return type options for the WEEKNUM function are as follows:
  • 1 - Week starting on Sunday
  • 2 - Week starting on Monday
  • 3 - ISO 8601 week starting on Monday
  • 11 - US week starting on Sunday
  • 12 - US week starting on Monday

Make Better Decisions
With Data

Analyze data, automate reports and create live dashboards
for all your business applications, without code. Get unlimited access free for 14 days.