DTDATEw. Format
Expects a SAS datetime value as input and writes
the SAS date values in the form ddmmmyy or ddmmmyyyy.
Category: |
Date and Time |
Alignment: |
Right |
Syntax
Arguments
w
specifies the width
of the output field.
Default |
7 |
Range |
5–9 |
Tip |
Use a width of 9 to print a 4-digit year. |
Details
The DTDATE
w.
format writes SAS date values in the form
ddmmmyy or
ddmmmyyyy,
where
dd
is an integer that
represents the day of the month.
mmm
are the first three
letters of the month name.
yy or yyyy
is a two-digit or four-digit
integer that represents the year.
Comparisons
The DTDATE
w.
format produces the same type of output that the DATE
w.
format produces. The difference is that the DTDATE
w.
format requires a SAS datetime value.
Example
The example table uses
the input value of 1510285759, which is the SAS datetime value that
corresponds to 3:49:19 AM on November 10, 2013, and prints both a
two-digit and a four-digit year for the DTDATE
w.
format.
|
|
|
|
select put(1510285759,dtdate.);
|
|
select put(1510285759,dtdate9.);
|
|