Return the week number
Member of Date Intrinsic Functions (PRIM_LIBI.IDateIntrinsics)
Name | Type | Data Type | Description |
---|---|---|---|
Result | *Result (Optional) | Integer | Week number of the date |
StartOfWeek | *Input (Optional) | Enumeration | Day of the week to be used as the start of the week |
Format | *Input (Optional) | Enumeration | Method used to evaluate the week number |
Week returns the week number associated with the date. StartOfWeek defaults to Monday and Format defaults to ISO
Enum Value | Description |
---|---|
FirstDay | Start evaluating weeks based on January 1st |
ISO | Follows the ISO 8601 standard for the start of the year |
In this example, a date of 2011-01-01 which was a Saturday would return 52 as the ISO standard means it's part of the last week of the previous year.
#Result := #Today.Week
However, the same date would produce a result of 1 if measured using FirstDay
#Result := #Today.Week(Monday FirstDay)
Febuary 18 V14SP2