Apache Pinot Docs
Search…
latest
Configuration Reference
yearOfWeek
This section contains reference documentation for the yearOfWeek function.
Returns the year of the ISO week from the given epoch millis and timezone id. Alias yowis also supported.

Signature

yearOfWeek(tsInMillis)
yearOfWeek(tsInMillis, timeZoneId)
yow(tsInMillis)
yow(tsInMillis, timeZoneId)

Usage Examples

1
select yearOfWeek(1609731386000) AS year
2
FROM ignoreMe
Copied!
year
2021
1
select yearOfWeek(1609731386000, 'America/Toronto') AS year
2
FROM ignoreMe
Copied!
year
2020
1
select yow(1609731386000) AS year
2
FROM ignoreMe
Copied!
year
2021
1
select yow(1609731386000, 'America/Toronto') AS year
2
FROM ignoreMe
Copied!
year
2020
Copy link