Writes SAS datetime values in the form ddmmmyy:hh:mm:ss.ss with AM or PM.
| Category: | Date and Time |
| Alignment: | Right |
specifies the width of the output field.
| Default | 19 |
| Range | 7–40 |
| Tip | SAS requires a minimum w value of 13 to write AM or PM. For widths between 10 and 12, SAS writes a 24-hour clock time. |
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 |
| Note | If w – d< 17, SAS truncates the decimal values. |
|
Statements
|
Results
|
|---|---|
----+----1----+----2----+ |
|
select put (1679344494,dateampm.); |
19MAR13:08:34:54 PM |
select put (1679344494,dateampm7.); |
19MAR13 |
select put (1679344494,dateampm10.); |
19MAR13:20 |
select put (1679344494,dateampm13.); |
19MAR13:08 PM |
select put (1679344494,dateampm22.2.); |
19MAR13:08:34:54.00 PM |