WEEKNUM

Return a number representing the week of the year where the provided date falls.

Parameter List

Syntax
WEEKNUM(date
[type]
)
date

The date for which to determine the week number. For example: 2022-04-23.

[optional] type

A number that determines the day that a week starts.

  • '1' (default). Week begins on Sunday (1), ends on Saturday (7). 1st week of the year contains Jan 1st. USA 🇺🇸.
  • '2'. Week begins on Monday (1), ends on Sunday (7). 1st week of the year is the one that contains Jan 1st.
  • '11'. Week begins on Monday (1), ends on Sunday (7). 1st week of the year is the one that contains Jan 1st.
  • '12'. Week begins on Tuesday (1), ends on Monday (7). 1st week of the year is the one that contains Jan 1st.
  • '13'. Week begins on Wednesday (1), ends on Tuesday (7). 1st week of the year is the one that contains Jan 1st.
  • '14'. Week begins on Thursday (1), ends on Wednesday (7). 1st week of the year is the one that contains Jan 1st.
  • '15'. Week begins on Friday (1), ends on Thursday (7). 1st week of the year is the one that contains Jan 1st.
  • '16'. Week begins on Saturday (1), ends on Friday (7). 1st weel of the year is the one that contains Jan 1st.
  • '17'. Week begins on Sunday (1), ends on Saturday (7). 1st week of the year is the one that contains Jan 1st. USA 🇺🇸.
  • '21'. Week begins on Monday (1), ends on Sunday (7). 1st week of the year is the one that contains the first thursday. Europe 🇪🇺, ISO 8601.
Selected options:
1: Mon is day 1 of week, Week 1 contains Jan 1st. USA 🇺🇸.
2: Mon is day 1 of week, Week 1 contains Jan 1st.
11: Mon is day 1 of week, Week 1 contains Jan 1st.
12: Tue is day 1 of week, Week 1 contains Jan 1st.
13: Wed is day 1 of week, Week 1 contains Jan 1st.
14: Thu is day 1 of week, Week 1 contains Jan 1st.
15: Fri is day 1 of week, Week 1 contains Jan 1st.
16: Sat is day 1 of week, Week 1 contains Jan 1st.
17: Sun is day 1 of Week, Week 1 contains Jan 1st.
21: Mon is day 1, Week 1 contains 1st Thu. 🇪🇺, ISO 8601.

Examples

WEEKNUM("2022-09-02") returns 36