DATEAMPMw.d Format
Writes datetime values in the form ddmmmyy:hh:mm:ss.ss with AM or PM.
Category: |
Date and Time |
Alignment: |
right |
Syntax
Syntax Description
- w
-
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.
- d
-
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
Note:If w–d< 17, SAS truncates the decimal values.
Details
The DATEAMPM
w.
d format
writes SAS datetime values in the form
ddmmmyy:hh:mm:ss.ss, where
is an integer that
represents the day of the month.
is the first three
letters of the month name.
is a two-digit integer
that represents the year.
is an integer that
represents the hour.
is an integer that
represents the minutes.
is the number of seconds
to two decimal places.
Comparisons
The DATEAMPM
w.
d format
is similar to the DATETIME
w.
d format except that DATEAMPM
w.
d prints
AM or PM at the end of the time.
Example
The example table uses
the input value of 1650538894, which is the SAS datetime value that
corresponds to 11:01:34 a.m. on April 20, 2012.
|
|
|
----+----1----+----2----+
|
|
|
|
|
|
|
|
|
|
|