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
-
WEEKDAY_XX
Determines the day of the week for a specified date -
Date
Date in YYMMDD or YYYYDDMM format
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.
Return Codes
The script function returns the following values:
- MO
Monday - DI
Tuesday - MI
Wednesday - DO
Thursday - FR
Friday - SA
Saturday - SO
Sunday
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: