MONYYw. Informat

Reads month and year date values in the form mmmyy or mmmyyyy.
Category: Date and Time

Syntax

MONYYw.

Syntax Description

w
specifies the width of the input field.
Default:5
Range:5–32

Details

The date values must be in one of the following forms:
  • mmmyy
  • mmmyyyy
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.
A value read with the MONYYw. informat results in a SAS date value that corresponds to the first day of the specified month.
Note: SAS interprets a two-digit year as belonging to the 100-year span that is defined by the YEARCUTOFF= system option.

Example

input month_and_year monyy7.;
Data Line
Result
----+----1
mar 12
19053
mar2012
19053

See Also

Functions:
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