YYMONw. Format

Writes date values in the form yymmm or yyyymmm.

Category: Date and Time
Alignment: Right

Syntax

YYMONw.

Syntax Description

w

specifies the width of the output field. If the format width is too small to print a four-digit year, only the last two digits of the year are printed.

Default 7
Range 5–32

Details

The YYMONw. format writes SAS date values in the form <yy>yymmm:
<yy>yy
is a two-digit or four-digit integer that represents the year.
mmm
is the name of the month, abbreviated to three characters.

Example

The example table uses the input value of 19158, which is the SAS date value that corresponds to June 14, 2012.
SAS Statement
Result
 
----+----1
put date yymon6.;
 02JUN
put date yymon7.;
2012JUN

See Also

Formats: