WEEKDAY_XX

Use the WEEKDAY_XX script function to return the day of the week of a particular date. The weekday is returned as a two-character abbreviation.

Syntax

WEEKDAY_XX ([Date Format:]Date)

Parameters

Return Codes

The script function returns the following values:

Examples

December 31, 1999 was a Friday, so the following script returns the value FR:

:SET &NEWYEARSEVE_2000# = WEEKDAY_NR("991231")

January 1, 2000 was a Saturday, so the following script returns the value SA. The date format is specified because the date provided is not in YYMMDD or YYYYMMDD format.

:SET &NEWYEAR_2000# = WEEKDAY_NR("DD-MM-YYYY:01-01-2000")

See also:

seealso

Script Date and Time Functions

Date, Time and Period Formats in Scripts