week_of_year
The week_of_year
function returns an integer representing the week number. The week number is calculated from the first week of a year, which is the one that includes the first Thursday, according to ISO 8601.
Syntax
week_of_year( Datetime )
Arguments
- Datetime: A
datetime
.
Returns
The week number of the given year.
Examples
week_of_year(datetime(2020-12-31))
returns as53
week_of_year(datetime(1970-01-01))
returns as1