DATESTYLE= System Option

Specifies the sequence of month, day, and year when ANYDTDTE, ANYDTDTM, or ANYDTTME informat data is ambiguous.
Valid in: Configuration file, SAS invocation, OPTIONS statement, SAS System Options window
Categories: Environment control: Language control

Input control: Data processing

PROC OPTIONS GROUP= INPUTCONTROL

LANGUAGECONTROL

Note: This option cannot be restricted by a site administrator. For more information, see Restricted Options.

Syntax

DATESTYLE= MDY | YMD | DMY | LOCALE

Syntax Description

MDY
specifies that SAS set the order as month, day, year.
YMD
specifies that SAS set the order as year, month, day.
DMY
specifies that SAS set the order as day, month, year.
LOCALE
specifies that SAS set the order based on the value that corresponds to the LOCALE= system option value and is one of the following: MDY | YMD | DMY.

Details

System option DATESTYLE= identifies the order of month, day, and year. The default value is LOCALE. The default LOCALE system option value is English, therefore, the default DATESTYLE order is MDY.
To get the default settings for each locale option value, see Locale Values.

See Also

Informats:
ANYDTDTEw. Informat in SAS Formats and Informats: Reference
ANYDTDTMw. Informat in SAS Formats and Informats: Reference
ANYDTTMEw. Informat in SAS Formats and Informats: Reference
System Options:
LOCALE System Option in SAS National Language Support (NLS): Reference Guide