Domain: Environment information (calendar)
The DAY( ) function supplies the name of the current day of the week in the specified language, but only in abbreviated form.
Format
DAY( ) |
LANGUAGE = *ENGLISH / *GERMAN / *STD BASE = *TODAY / string_expression |
Result type
STRING (<string 2..3>)
Input parameters
LANGUAGE = *ENGLISH / *GERMAN / *STD
Defines the language in which the name of the current day of the week is to be returned. When *STD is specified, the output appears in the language set for the task.
BASE = string_expression
Designates the date.
When specified, the only permitted formats are *ISO, *AMERICAN and *GERMAN. The value must be greater than or equal to 1582-10-15. If no date specified or *TODAY is given it takes current date for evaluation.
Result
Two- or three-letter abbreviation for the day of the week, depending on the specified language.
Input parameters | Result |
*ENGLISH | SUN / MON / TUE / WED / THU / FRI / SAT |
*GERMAN | SO / MO / DI / MI / DO / FR / SA |
Error messages
SDP0452 INVALID DATE
Example
/G = DAY(LANGUAGE = *GERMAN) /SHOW-VARIABLE G G = MO /E = DAY( ) /SHOW-VARIABLE E E = MON /G = DAY(LANGUAGE = *GERMAN, BASE='2015-07-30') /SHOW-VARIABLE G G = DO