MMDDYYw. Informat

Reads date values in the form mmddyy or mmddyyyy.

Category: Date and Time

Syntax

MMDDYYw.

Syntax Description

w

specifies the width of the input field.

Default 6
Range 6–32

Details

The date values must be in one of the following forms:
  • mmddyy
  • mmddyyyy
mm
is an integer between 01 and 12 that represents the month.
dd
is an integer between 01 and 31 that represents the day of the month.
yy or yyyy
is a two-digit or four-digit integer that represents the year.
You can separate the month, day, and year fields by blanks or by special characters. However, if you use delimiters, place them between all fields in the value. Blanks can also be placed before and after the date.
Note: SAS interprets a two-digit year as belonging to the 100-year span that is defined by the YEARCUTOFF= system option.

Example

input calendar_date mmddyy8.;
Data Line
Result
----+----1----+
031612
19068
03/16/12
19068
03 16 12
19068
03162012
19068

See Also

Functions:
DAY Function in SAS Functions and CALL Routines: Reference
MDY Function in SAS Functions and CALL Routines: Reference
MONTH Function in SAS Functions and CALL Routines: Reference
YEAR Function in SAS Functions and CALL Routines: Reference
System Options:
YEARCUTOFF= System Option in SAS System Options: Reference