Writes SAS datetime values in the form ddmmmyy:hh:mm:ss.ss.
Category: | Date and Time |
Alignment: | Right |
specifies the width of the output field.
Default | 16 |
Range | 7–40 |
Tips | SAS requires a minimum w value of 16 to write a SAS datetime value with the date, hour, and seconds. Add an additional two places to w and a value to d to return values with optional decimal fractions of seconds. |
If w – d< 17, SAS truncates the decimal values. |
specifies the number of digits to the right of the decimal point in the seconds value.
Range | 0–39 |
Requirement | must be less than w |
Statements
|
Results
|
---|---|
----+----1----+----2 |
|
select put (1699674559,datetime.); |
10NOV13:03:49:19 |
select put (1699674559,datetime7.); |
10NOV13 |
select put (1699674559,datetime12.); |
10NOV13:03 |
select put (1699674559,datetime18.); |
10NOV13:03:49:19 |
select put (1699674559,datetime18.1); |
10NOV13:03:49:19.0 |
select put (1510285759,datetime19.); |
10NOV2013:03:49:19 |
select put (1699674559,datetime20.1); |
10NOV2013:03:49:19.0 |
select put (1699674559,datetime21.2); |
10NOV2013:03:49:19.00 |