DTYEARw. Format
Writes the date part of a SAS datetime value as
the year in the form yy or yyyy.
Category: |
Date and Time |
Alignment: |
Right |
Syntax
Arguments
w
specifies the width
of the output field.
Comparisons
The DTYEAR
w.
format is similar to the YEAR
w.
format in that they both write date values. The difference is that
DTYEAR
w. expects a SAS datetime
value as input, and YEAR
w.
expects a SAS date value.
Example
The example table uses
as input the value 1678898894, which is the SAS datetime value that
corresponds to March 14, 2013, at 04:48:14 AM.
|
|
|
|
select put(1678898894,dtyear.);
|
|
select put(1678898894,dtyear2.);
|
|
select put(1678898894,dtyear3.);
|
|
select put(1678898894,dtyear4.);
|
|