GetWeekYear

Description

Returns the week year from a datetime expression.

Syntax

GetWeekYear(datetime_expression)

Examples

GetWeekYear(ToDate('2012-12-31T08:02:31.667Z')) returns 2013

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

Notes

If January 1 is on a Friday, Saturday or Sunday, it is part of week 52 or 53 of the previous year, and therefore the week year will be different than the calendar year.
For more information, see http://en.wikipedia.org/wiki/ISO_week_date.

Return value datatype

Integer

Impact of null value

If input is null, returns null.

Feedback and Knowledge Base