DATEFMT

Controls the format of the date returned in the &SYSDATE and SYFDATE variables.

Type

Dialog Language function

Format

DATEFMT([format])
format
An optional field specifying the preferred date format:
MMDDYY
U.S. date format: 2-digit month, day, and year.
DDMMYY
European date format: 2-digit day, month, and year.
YYMMDD
International date format: 2-digit year, month, and day.

Return Codes

0
U.S. date format (MMDDYY).
4
European date format (DDMMYY).
8
International date format (YYMMDD).
12
Invalid parameter specified.

Usage Notes®

  1. DATEFMT changes the format of the date returned in &SYSDATE and &SYSFDATE.
  2. format is optional. If omitted, DATEFMT returns the current format.

Example

The following example specifies the European date format. &SYSDATE will be displayed as dd/mm/yy.