Export (0) Print
Expand All
Expand Minimize

SET DATE Command

Visual Studio .NET 2003

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

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   When SET DATE is set to SHORT or LONG, a date before {^1601-01-01} is invalid and generates an error.

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.

See Also

DATE( ) | DATETIME( ) | SET CENTURY | SET DATASESSION | SET MARK TO | SET SYSFORMATS

Show:
© 2014 Microsoft