Writes SAS date values in the form yymmdd or [yy]yy-mm-dd, where a hyphen (-) is the separator and the year appears as either 2 or 4 digits.
Category: | Date and Time |
Alignment: | Right |
specifies the width of the output field.
Default | 8 |
Range | 2–10 |
Interaction | When w has a value of from 2 to 5, the date appears with as much of the year and the month as possible. When w is 7, the date appears as a two-digit year without a hyphen. |
yymmdd |
[yy]yy-mm-dd |
Statements
|
Results
|
---|---|
|
----+----1----+ |
select put(19450,yymmdd2.); |
13 |
select put(19450,yymmdd3.); |
13 |
select put(19450,yymmdd4.); |
1304 |
select put(19450,yymmdd5.); |
13-04 |
select put(19450,yymmdd6.); |
130402 |
select put(19450,yymmdd7.); |
130402 |
select put(19450,yymmdd8.); |
13-04-02 |
select put(19450,yymmdd10.); |
2013-04-02 |