MMYYw. Format

Writes SAS date values in the form mmM[yy]yy, where M is the separator and the year appears as either 2 or 4 digits.

Category: Date and Time
Alignment: Right

Syntax

MMYYw.

Arguments

w

specifies the width of the output field.

Default 7
Range 5–32
Interaction When w has a value of 5 or 6, the date appears with only the last two digits of the year. When w is 7 or more, the date appears with a four-digit year.

Details

The MMYYw. format writes SAS date values in the form mmM<yy>yy, where
mm
is an integer that represents the month.
M
is the character separator.
[yy]yy
is a two-digit or four-digit integer that represents the year.

Example

The following examples use the input value of 19431, which is the SAS date value that corresponds to March 14, 2013.
Statements
Results
 
----+----1----+
select put(19431,mmyy5.);
03M13
select put(19431,mmyy6.);
 03M13
select put(19431,mmyy7.);
03M2013
select put(19431,mmyy10.);
   03M2013