Previous Page | Next Page

Formats

MONYYw. Format



Writes date values as the month and the year in the form mmmyy or mmmyyyy.
Category: Date and Time
Alignment: right

Syntax
Syntax Description
Details
Comparisons
Examples
See Also

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.


Examples

The example table uses the input value of 16794, which is the SAS date value that corresponds to December 24, 2005.

SAS Statement Results
 
----+----1
put date monyy5.; 
DEC05
put date monyy7.; 
DEC2005


See Also

Formats:

DTMONYYw. Format

DDMMYYw. Format

MMDDYYw. Format

YYMMDDw. Format

Functions:

MONTH Function

YEAR Function

Informat:

MONYYw. Informat

Previous Page | Next Page | Top of Page