NLSTRQTRw.d Format

Writes a numeric value as the quarter-of-the-year in the specified locale.
Category: Numeric
Alignment: left

Syntax

NLSTRQTRw.d

Syntax Description

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

Details

The NLSTRQTRw.d format writes a SAS value, 1–4 as the name-of-the-quarter for the year in the specified locale. The following examples use the English_UnitedStates locale.
  • 1 = 1st quarter
  • 2 = 2nd quarter
  • 3 = 3rd quarter
  • 4 = 4th quarter

Example

This example uses the English_UnitedStates session encoding.
Statements
Results
Data _null_ ;
qtrnum = 1 ; /* January=1, December=12 */
put qtrnum NLSTRQTR20. ;
put qtrnum NLSTRQTR20.1; /* decimal .1 specified use abbreviation. */
put qtrnum NLSTRQTR20.2;
put qtrnum NLSTRQTR20.3; run;
1st quarter
1st quarter
1ST QUARTER
1ST QUARTER