Week
Calculates the week number for a given date.
Variants
Week(Date date)
Calculates the week number using the first day of the week specific to the location defined in the "Language and location" property in database properties.
Parameters
- date
- The date to check.
Returns
Number
Remarks
The week numbering is calculated as follows: Week one begins on January 1st, and week two begins on the first day of the week specific to each location, as specified in the "Language and location" property from database properties. For Canada, USA, China, Korea, Japan, Israel, South Africa, and most of Latin America, the first day of the week is Sunday.
Examples
Week(#2016-07-25#)
returns the week number 31.
Week(Date date, Numeric weekday)
Calculates the week number using a specified first day of the week.
Parameters
- date
- The date to check.
- weekday
- The numeric value representing the weekday (e.g. 0=Sunday, 1=Monday, 6=Saturday, etc.).
Returns
Number
Remarks
The week numbering is calculated as follows: Week one begins on January 1st, and week two begins on the first day of the week based on the weekday parameter.
Examples
Week(#2016-07-25#, 3)
returns the week number 30.