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. For more information, see UC_CLIENT_SETTINGS - Various Client Settings.

Syntax

WEEK_NR ([DateFormat:]Date)

Parameters

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:

seealso

Script Date and Time Functions

Date, Time and Period Formats in Scripts