Writes datetime values in the form ddmmmyy:hh:mm:ss.ss.
Category: | Date and Time |
Alignment: | Right |
Restriction: | If w–d< 17, SAS truncates the decimal values. |
Interaction: | When the DECIMALCONV= system option is set to STDIEEE, the output that is written using this format might differ slightly from previous releases. For more information, see DECIMALCONV= System Option in SAS System Options: Reference. |
specifies the width of the output field.
Default | 16 |
Range | 7–40 |
Tip | 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. |
specifies the number of digits to the right of the decimal point in the seconds value. This argument is optional.
Range | 0–39 |
Requirement | must be less than w |
SAS Statement
|
Result
|
---|---|
----+----1----+----2----+ |
|
put event datetime.; |
10NOV12:03:49:19 |
put event datetime7.; |
10NOV12 |
put event datetime12.; |
10NOV12:03 |
put event datetime18.; |
10NOV12:03:49:19 |
put event datetime18.1; |
10NOV12:03:49:19.0 |
put event datetime19.; |
10NOV2012:03:49:19 |
put event datetime20.1; |
10NOV2012:03:49:19.0 |
put event datetime21.2; |
10NOV2012:03:49:19.00 |