Writes date values as the month of the year.
Category: |
Date and Time
|
Alignment: |
right
|
-
w
-
specifies the width of the output field.
Default: |
2 |
Range: |
1-32 |
Tip: |
Use MONTH1. to obtain a
hexadecimal value. |
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.
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
|
Copyright © 2011 by SAS Institute Inc., Cary, NC, USA. All rights reserved.