Skip to main content
Version: I2024.1.3

Week

Returns an integer (1-53) representing the week of the year in which the given date occurs. This function is equivalent to the expression cint(format(date, "ww")).

Syntax

Week(Date)

Parameters

Date
The date to return the week for.

Example

The following expression returns the number of the week in which 2007-07-05 occurred:

[DateCustom].[DateInt].[WeekInt].&[`Year("2007-07-05T12:30:10")`]&[`Week("2007-07-05T12:30:10")`]