NLSTRMONw.d Format

Writes the month name in the specified locale.
Category: Numeric
Alignment: left

Syntax

NLSTRMONw.d

Syntax Description

w
specifies the width of the output field
Default:20
Range:200-1
d
specifies the following:
  • 00000001: write abbreviated form.
  • 00000010: write capitalized form.
Default:0
Range:0-3

Details

The NLSTRMONw.d format writes a SAS value, 1–12 as the name-of-the-month in the specified locale. The following examples use the English_UnitedStates locale.
  • 1 = the first month (January)
  • 2 = the second month (February)
  • 3 = the third month (March)
  • 4 = the fourth month (April)
  • 5 = the fifth month (May)
  • 6 = the sixth month (June)
  • 7 = the seventh month (July)
  • 8 = the eight month (August)
  • 9 = the ninth month (September)
  • 10 = the tenth month (October)
  • 11 = the eleventh month (November)
  • 12 = the twelfth month (December)

Example

This example uses the English_UnitedStates session encoding.
Statements
Results
Data _null_ ;
monnum = 1 ; /* January=1, December=12 */
put monnum NLSTRMON20. ;
put monnum NLSTRMON20.1; /* decimal .1 specified use abbreviation. */
put monnum NLSTRMON20.2;
put monnum NLSTRMON20.3;
run;
January
Jan
JANUARY
JAN