DATEw. Informat

Reads date values in the form ddmmmyy or ddmmmyyyy.
Category: Date and Time

Syntax

DATEw.

Syntax Description

w
specifies the width of the input field.
Default:7
Range:7–32
Tip:Use a width of 9 to read a 4–digit year.

Details

The date values must be in the form ddmmmyy or ddmmmyyyy:
dd
is an integer between 01 and 31 that represents the day of the month.
mmm
is the first three letters of the month name.
yy or yyyy
is a two-digit or four-digit integer that represents the year.
You can separate the year, month, and day values by blanks or by special characters. Make sure the width of the input field allows space for blanks and special characters.
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 date11.; 
Data Line
Result
----+----1----+
16mar12
19068
16 mar 12
19068
16-mar-2012
19068

See Also

Formats:
Functions:
DATE Function in SAS Functions and CALL Routines: Reference
System Options:
YEARCUTOFF= System Option in SAS System Options: Reference