WEEK_NR

Script Function: Returns the calendar week of a date

Syntax

WEEK_NR ([Date Format:]Date)

Syntax

Description/Format

Date


Return code

Calendar week (3-figure)

Comments

Optionally, you may specify a particular Date Format. The default Date Formats to be used are "YYMMDD" or "YYYYMMDD". A colon or semicolon may be used as a separator between Date Format and Date.

Calendar week calculation depends on the definitions made for the first calendar week of the year. The particular week that should be regarded as the starting week may be determined by the administrator in the variable UC_CLIENT_SETTINGS with the keys "FIRST_WEEK_METHOD" and "FIRST_DAY_OF_WEEK".

Example

The function returns the calendar week "052" of this day.

:SET &CW# = WEEK_NR("991231")

See also:

Script element Description

WEEKDAY_NR

Returns the day of a week of a given date as a number

WEEKDAY_XX

Returns the day of the week of a given date as an abbreviation

Script Elements - Date and Time

Date, Time and Period Formats

About Scripts
Script Elements - Alphabetical Listing

Script Elements - Ordered by Function