Previous Page | Next Page

Formats

MONTHw. Format



Writes date values as the month of the year.
Category: Date and Time
Alignment: right

Syntax
Syntax Description
Details
Examples
See Also

Syntax

MONTHw.

Syntax Description

w

specifies the width of the output field.

Default: 2
Range: 1-32
Tip: Use MONTH1. to obtain a hexadecimal value.

Details

The MONTHw. format writes the month (1 through 12) of the year from a SAS date value. If the month is a single digit, the MONTHw. format places a leading blank before the digit. For example, the MONTHw. format writes 4 instead of 04.


Examples

The example table uses the input value of 18031, which is the SAS date value that corresponds to May 14, 2009.

SAS Statement Results
 
----+----1
put date month.;
5


See Also

Format:

MONNAMEw. Format

Previous Page | Next Page | Top of Page