MDYAMPMw.d Format
Writes datetime values in the form mm/dd/yy<yy> hh:mm AM|PM. The year can
be either two or four digits.
Category: |
Date and Time |
Alignment: |
right |
Note: |
The default time period is AM. |
Syntax
Syntax Description
- w
-
specifies the width
of the output field.
Details
The MDYAMPM
w.d format writes SAS datetime values in the
following form:
mm/dd/yy<yy> hh:mm<AM | PM>:
is an integer between
1 and 12 that represents the month.
is an integer between
1 and 31 that represents the day of the month.
specifies a two-digit
or four-digit integer that represents the year.
is an integer between
00 and 23 that represents hours.
is an integer between
00 and 59 that represents minutes.
specifies either the
time period 00:01−12:00 noon (AM) or the time period 12:01−12:00
midnight (PM). The default is AM.
date and time separator characters
is one of several special
characters, such as the slash (/), colon (:), or a blank character
that SAS uses to separate date and time components.
Comparisons
The MDYAMPM
w. format writes datetime values with separators
in the form
mm/dd/yy<yy> hh:mm AM | PM, and requires a space between the date and the time.
The DATETIME
w.d format writes datetime values with separators
in the form
ddmmmyy<yy>: hh:mm:ss.ss.
Example
This example uses the
input value of 1663343580, which is the SAS datetime value that corresponds
to 3:53:00 PM on September 15, 2012.