isoyear
Get the ISO week-numbering year, which can differ from the calendar year around New Year.
Try an expression
In Formula, enter the expression and set Output type to BIGINT.
Expression
isoyear(DATE '2022-01-01')Result
2021To use your own data, replace the example values with column names. Keep format strings and other options as written.
Arguments and types
isoyear(ts)- ts
- Date, Interval, Timestamp
Supported signatures (4)
isoyear(ts: DATE) → BIGINT
isoyear(ts: INTERVAL) → BIGINT
isoyear(ts: TIMESTAMP WITH TIME ZONE) → BIGINT
isoyear(ts: TIMESTAMP) → BIGINTThe result type can depend on the input types. See DuckDB for the full argument rules.
Things to know
If the first argument is missing, the result is NULL.
Function metadata from DuckDB, used under the MIT license.