DDMMYYw. Informat

Reads date values in the form ddmmyy<yy> or dd-mm-yy<yy>, where a special character, such as a hyphen (-), period (.), or slash (/), separates the day, month, and year; the year can be either 2 or 4 digits.

Category: Date and Time

Syntax

DDMMYYw.

Syntax Description

w

specifies the width of the input field.

Default 6
Range 6–32

Details

The date values must be in the form ddmmyy<yy> or ddxmmxyy<yy>:
dd
is an integer between 01 and 31 that represents the day of the month.
mm
is an integer between 01 and 12 that represents the month.
yy or yyyy
is a two-digit or four-digit integer that represents the year.
x
is a separators that can be any special character or a blank.:
If you use separators, place them between all the values. Blanks can also be placed before and after the date. 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 ddmmyy10.;
Data Line
Result
----+----1----+
160308
19068
16/03/08
19068
16-03-2008
19068
16 03 2008
19068

See Also

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