SET DATE Command

See Also

Specifies the format for the display of Date and DateTime expressions.

Syntax

SET DATE [TO] AMERICAN | ANSI | BRITISH | FRENCH | GERMAN
| ITALIAN | JAPAN | TAIWAN | USA | MDY | DMY | YMD
| SHORT | LONG

Remarks

Here are the settings and the resulting date formats:

Setting Format
AMERICAN mm/dd/yy
ANSI yy.mm.dd
BRITISH/FRENCH dd/mm/yy
GERMAN dd.mm.yy
ITALIAN dd-mm-yy
JAPAN yy/mm/dd
TAIWAN yy/mm/dd
USA mm-dd-yy
MDY mm/dd/yy
DMY dd/mm/yy
YMD yy/mm/dd
SHORT Short date format determined by the Windows Control Panel short date setting.
LONG Long date format determined by the Windows Control Panel long date setting. Note that when SET DATE is set to LONG, dates before {^1601-01-01} that are converted to character strings are returned as the empty date.

The default date setting is AMERICAN.

The SET DATE setting also determines how the date appears in datetime expressions.

If DATE is set to SHORT or LONG, the SET CENTURY, SET MARK, SET HOURS, and SET SECONDS settings are ignored.

SET DATE is scoped to the current data session.