WEEK(text/date/value,"F1"/"F7")
Returns the week number of a given date within a year.
text/date/value
Represents the date entered.
"F1"/"F7" (must be uppercase)
Determines the date range for the first week of the year:
F1 determines that the week containing January 1st is the first week of the year, and the date range is from January 1st to the last day of that week.
F7 determines that the first complete week is the first week of the year, and the date range is from the start date to the end date of the first complete week.
1. The Week Start from setting on the decision-making platform determines whether the week begins on Sunday or Monday, which affects the date range of the first week.
2: Currently, only F1 and F7 are supported.If F1 or F7 is not entered, the default value is F7.
Value
The WEEK() function allows the parameters to be left blank. If the parameters are empty, the function returns the corresponding week number of the current system server time for the current year.
If any parameter is NULL, the result is NULL.
F1 means that the week starts from Monday, with the week containing January 1st as the first week, spanning from January 1st to the last day of that week.
F7 means that the week starts from Sunday, with the first complete week within the year as the first week. If the Monday of the week containing January 1st of the year falls in the previous year, that week is considered as the 52nd week of the previous year.
Take 2021/01/03 as an example.
If you set Week Start from to Monday on the platform, the following table describes specific content.
52
Starting from Monday, the first complete week is from January 4th to January 10th, so the returned value is 52.
1
The first week starts from January 1st, so the first week is from January 1st to January 3rd.
2
If you set Week Start from to Sunday on the platform:
Starting from Sunday, the first complete week is from January 3rd to January 9th, so the returned value is 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:
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)
滑鼠選中內容,快速回饋問題
滑鼠選中存在疑惑的內容,即可快速回饋問題,我們將會跟進處理。
不再提示
10s後關閉
Submitted successfully
Network busy