arrow-left

All pages
gitbookPowered by GitBook
1 of 1

Loading...

week

This section contains reference documentation for the week function.

Returns the ISO week of the year from the given epoch millis in UTC or specified timezone. The value ranges from 1 to 53.

hashtag
Signature

week(tsInMillis)

week(tsInMillis, timeZoneId)

weekOfYear(tsInMillis)

weekOfYear(tsInMillis, timeZoneId)

hashtag
Usage Examples

week
week
week
week
select week(1639351800000) AS week
FROM ignoreMe

49

50

49

50

select week(1639351800000, 'CET') AS week
FROM ignoreMe
select weekOfYear(1639351800000) AS week
FROM ignoreMe
select weekOfYear(1639351800000, 'CET') AS week
FROM ignoreMe