NLDATEYRw. Format

Converts the SAS date value to the date value of the specified locale, and then writes the date value as the year.
Category: Date and Time
Alignment: left

Syntax

NLDATEYRw.

Syntax Description

w
specifies the width of the output field.
Default:16
Range:2–200

Example

This example uses the fr_FR locale option.
Statements
Results
options locale=fr_FR;
data _null_;
dy=today();
dt=datetime();
put "+--- NLDATEYR min=2 default=16 max=200 ---+";
put dy nldateyr.;
put dy nldateyr2.;
put dy nldateyr8.;
put dy nldateyr200.;
run;
+--- NLDATEYR min=2 default=16 max=200 ---+
2008
08
2008
2008