WEEK

Syntax

WEEK( value )

Description

The number of the week according to ISO 8601. The first week is the week that contains the first Thursday of the year or January 4th.

Argument types:

  • valueDate | Datetime

Return type: Integer

Example

WEEK(#1971-01-14 01:02:03#) = 2

Data source support

ClickHouse 21.8, Microsoft SQL Server 2017 (14.0), MySQL 5.7, Oracle Database 12c (12.1), PostgreSQL 9.3, YDB.

Previous
Next