Week

Summary

The Week function returns the numeric week of the calendar year for the specified date expression. Values range from 1-53.

Syntax

Week(<date|date_time|instant|offset_date_time|zoned_date_time>)

Return Type

Integer

Details

Consider joining to the xactly.xc_period table if your business’ fiscal year differs from the standard calendar year.

Examples

eval Week(ToDate(‘2042-04-01’));

screen-shot-2016-09-21-at-10-06-46-am

select date1, Week(date1), Week(date_time1), Week(offset_date_time1), Week(zoned_date_time1) from AllTypes();

screen-shot-2016-09-21-at-10-06-53-am

Related Functions

DayOfMonth

DayOfWeek

DayOfYear

Month

Quarter

Year