Syntax
WEEK(Serial_number,"F1") or WEEK(Serial_number,"F7")
Returns the week number of a year.
Parameter 1
Serial_number
Represents the date entered. The Serial_number parameter can also be of the serial number type. For example, January 1, 1998 is stored as the serial number 35796 in the 1900 date system.
Parameter 2
"F1"/"F7"
Determines the date range for the first week of the year:
F1 represents that the week containing January 1st is the first week of the year, which starts on January 1st and ends on the last day of that week.
F7 represents that the first complete week is the first week of the year, which starts from the start date to the end date of the first complete week.
1. The Week Start from setting in the decision-making platform allows you to determine the start date of the week as Sunday/Monday, which will affect the date range of the first week. For details, see "Example" in this document.
2. Currently only two writing styles (F1 and F7) are supported. If F1/F7 is not entered, the default value is F7.
The function allows the parameters in WEEK(Serial_number,"F1"/"F7") to be empty. That is to say, you can simply use WEEK(). When the parameter is empty, take week number of the year of the current system server time.
The first parameter is of the date or text type by default, and the second is of the text type by default.
The second parameter is case-insensitive.
F1 means that the week starts from Monday, taking the week including January 1st as the first week, and the first week starts from January 1st to the last day of this week.
F7 means that the week starts from Sunday, taking the first complete week within the year as the first week of the year; when the Monday of the week including January 1st of the year falls in the previous year, the current week is considered as the 52nd week.
For example, 2021/01/03
If you set Week Start from to Monday on the platform,
the following table describes specific content.
Date
2021-01-03
Description
2021-01-04
2021-01-05
WEEK (with parameter F7)
52
Starting from Monday, the first complete week is from 01-04 to 01-10, so 01-03 is displayed as 52.
1
WEEK (with parameter F1)
The first week starts from January 1st, and the first week is from January 1st to January 3rd.
2
If you set Week Start from to Sunday on the platform, the following table describes specific content.
Starting from Sunday, the first complete week is from January 3rd to January 9th, so January 3rd is displayed as 1.
The first week starts from January 1st, so the first week is from January 1st to 2nd and the second week is from January 3rd to 9th.
Other examples:
Formula
Result
Note
WEEK()
The corresponding system server time is 2010-01-01 15:36:25.
WEEK("2010-1-1")
WEEK("2010/1/1","F1")
WEEK("2010/1/6")
WEEK(35796)
WEEK(Serial_number)
Parameter
Represents the date entered.
The function allows the parameter in WEEK(Serial_number) to be empty. That is to say, you can simply use WEEK(). When the parameter is empty, take the week number of the year of the current system server time.
The parameter can be of the default date or text type.
For details, see the example in "Extracted Data" in this document.
WEEK("2010-01-01")
WEEK("2010-01-06")
滑鼠選中內容,快速回饋問題
滑鼠選中存在疑惑的內容,即可快速回饋問題,我們將會跟進處理。
不再提示
10s後關閉
Submitted successfully
Network busy