TIMEw.d Format
Writes SAS time values as hours, minutes, and seconds
in the form hh:mm:ss.ss using
the military 24-hour clock.
Category: |
Date and Time |
Alignment: |
Right |
Syntax
Arguments
w
specifies the width
of the output field.
Default |
8 |
Range |
2–20 |
Tip |
Make w large enough
to produce the desired results. To obtain a complete time value with
three decimal places, you must allow at least 12 spaces: eight spaces
to the left of the decimal point, one space for the decimal point
itself, and three spaces for the decimal fraction of seconds.
|
d
specifies the number
of digits to the right of the decimal point in the seconds value.
Default |
0 |
Range |
0–19 |
Requirement |
must be less than w |
Details
The TIME
w.
d format
writes SAS time values in the form
hh:mm:ss.ss,
where
hh
is an integer.
Note: If
hh is
a single digit, TIME
w.
d places
a leading blank before the digit. For example, the TIME
w.d. format
writes 9:00 instead of 09:00.
mm
is the number of minutes,
ranging from 00 through 59.
ss.ss
is the number of seconds,
ranging from 00 through 59, with the fraction of a second following
the decimal point.
Comparisons
The TIME
w.
d format
is similar to the HHMM
w.
d format
except that TIME
w.
d includes
seconds.
The TIME
w.
d format
and the HHMM
w format write
a leading blank for a single-hour digit. The TOD
w.
d format
writes a leading zero for a single-hour digit.
Example
The example table uses
the input value of 59083, which is the SAS time value that corresponds
to 4:24:43 PM.