![]() Chapter Contents |
![]() Previous |
![]() Next |
| DATEAMPMw.d |
| Category: | Date and Time |
| Alignment: | right |
| Syntax | |
| Syntax Description | |
| Details | |
| Comparisons | |
| Examples | |
| See Also |
Syntax |
| DATEAMPMw.d |
| 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. |
| Requirement: | must be less than w |
| Range: | 0-39 |
Note: If
w-d< 17, SAS truncates the decimal values. ![[cautionend]](../common/images/cautend.gif)
| Details |
The DATEAMPMw.d format writes SAS datetime values in the form ddmmmyy:hh:mm:ss.ss, where
| Comparisons |
| Examples |
The example table uses the input value of 1347453583, which is the SAS datetime value that corresponds to 12:39:43 PM on September 12, 2002.
| SAS Statements | Results |
|---|---|
----+----1----+----2----+ |
|
put event dateampm.; |
12SEP02:12:39:43 PM |
put event dateampm7.; |
12SEP02 |
put event dateampm10.; |
12SEP02:12 |
put event dateampm13.; |
12SEP02:12 PM |
put event dateampm22.2; |
12SEP02:12:39:43.00 PM |
| See Also |
| Format:
|
![]() Chapter Contents |
![]() Previous |
![]() Next |
![]() Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.