WEEK_NR
Use the WEEK_NR script function to return the calendar week of a particular date. The calendar week is returned as a 3-digit value.
Note: Calendar week calculation depends on the definitions
made for the first calendar week of the year. Administrators define which week is the starting week of the year in the UC_CLIENT_SETTINGS variable, with the FIRST_WEEK_METHOD and FIRST_DAY_OF_WEEK keys.
Syntax
WEEK_NR ([DateFormat:]Date)
Parameters
-
WEEK_NR
Determines the calendar week for a specified date -
Date
Specifies the date
Format: script literal or script variable
Note: Specify the date format when you use a format other than YYMMDD or YYYYMMDD. Separate the date format and the date with a colon or semicolon. For more information, see Date, Time and Period Formats in Scripts.
Example
The following script returns the value of 052 as the calendar week for the specified date. The date is in the default YYMMDD format, so the date format does not need to be specified.
:SET &CW# = WEEK_NR("991231")
See also: