MONYYw. Format

Writes date values as the month and the year in the form mmmyy or mmmyyyy.

Category: Date and Time
Alignment: Right

Syntax

MONYYw.

Syntax Description

w

specifies the width of the output field.

Default 5
Range 5–7

Details

The MONYYw. format writes SAS date values in the form mmmyy or mmmyyyy, where
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.

Comparisons

The MONYYw. format and the DTMONYYw. format are similar in that they both write date values. The difference is that MONYYw. expects a SAS date value as input, and DTMONYYw. expects a datetime value.

Example

The example table uses the input value of 19127, which is the SAS date value that corresponds to May 14, 2012.
SAS Statement
Result
 
----+----1
put date monyy5.; 
MAY12
put date monyy7.; 
MAY2012

See Also

Functions:
MONTH Function in SAS Functions and CALL Routines: Reference
YEAR Function in SAS Functions and CALL Routines: Reference
Informat: