GetWeek

Description

Returns the week of a week year from a datetime expression.

Syntax

GetWeek(datetime_expression)

Examples

GetWeek(ToDate('2012-12-31T08:02:31.667Z')) returns 1

GetWeek(ToDate('2013-09-10T08:02:31.667Z')) returns 37

Notes

Week 1 in a week year is the week with the year's first Thursday.
For more information, see https://en.wikipedia.org/wiki/ISO_week_date.

Return value datatype

Integer

Impact of null value

If input is null, returns null.