NLDATEYWw. Format

Writes the SAS date value as the year and the week that is appropriate for the current SAS locale.

Categories:CAS
Date and Time
Alignment:Left
Note: Beginning in 2025.12, this format supports the BIGINT data type when run in the DS2 language. Set BIGINTPROCESSING=YES to ensure that large integer values—stored as BIGINT—are displayed with full precision, up to 19 digits, without rounding or truncation. BIGINTPROCESSING=YES is recommended for large values that exceed 15–16 digits.

Table of Contents

Syntax

NLDATEYWw.

Syntax Description

w

specifies the width of the output field.

Default16
Range5–200

Example

This example specifies the date April 4, 2019. This example specifies the fr_FR locale option.

options locale=fr_FR;
data _null_;
   dt = datetime();
   dy = date();
   put "+--- NLDATEYW min=5 default=16 max=200 ---+";
   put ' 16' +5 dy nldateyw.;
   put ' 5' +5 dy nldateyw5.;
   put ' 8' +5 dy nldateyw8.;
   put ' 32' +5 dy nldateyw32.;
   put '200' +5 dy nldateyw200.;
run;
+--- NLDATEYW min=5 default=16 max=200 ---+
 16     Semaine 14 2019
 5     *****
 8     S14 19
 32     Semaine 14 2019
200
Semaine 14 2019
Last updated: April 8, 2026