Previous Page | Next Page

Formats for NLS

NLSTRWKw.d Format



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

Syntax
Syntax Description
Details
Examples

Syntax

NLSTRWKw.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: 0
Range: 0-3

Details

The NLSTRQTRw.d format writes a SAS value, 1-7 as the name-of-the-week in the specified locale. The following examples use the English_UnitedStates locale.

1 = First day-of-week (Monday)

2 = Second day-of-week (Tuesday)

3 = Third day-of-week (Wednesday)

4 = Fourth day-of-week (Thursday)

5 = Fifth day-of-week (Friday)

6 = Sixth day-of-week (Saturday)

7 = Seventh day-of-week (Sunday)


Examples

This example uses the English_UnitedStates session encoding.

Statements Results
Data _null_ ;

wknum = 1 ; /* Sunday=1, Saturday=7 */

put wknum NLSTRWK20. ;

put wknum NLSTRWK20.1; /* decimal .1 specified use abbreviation. */

put wknum NLSTRWK20.2;

put wknum NLSTRWK20.3;

run;



Sunday

Sun

SUNDAY

SUN

Previous Page | Next Page | Top of Page