Reads hours, minutes, and seconds in the form hh:mm:ss.ss, where special characters such
as the colon (:) or the period (.)
are used to separate the hours, minutes, and seconds.
-
w
-
specifies the width of the input field.
The TIMEw. informat reads SAS time values
in the following form:
where
-
hh
-
is an integer that represents the number
of hours.
- :
-
represents a special character that separates hours, minutes,
and seconds.
- mm
-
is the number of minutes that range from 00 through 59.
- ss<.ss>
-
is an integer that represents the number of seconds, and
if needed, tenths of a second. Seconds and tenths of a second must always
be separated by a period.
- AM | PM
-
AM indicates time between 12:00 midnight and 11:59 in the
morning. PM indicates time between 12:00 noon and 11:59 at night.
Separate hh, mm,
and ss with a special character. When the period
is used as the special character, the time is interpreted in the order hours,
minutes, and seconds. For example, 23.22 is 23 hours and 22 minutes, not 23
minutes and 22 seconds, or 23 seconds and 22 tenths of a second.
If you do not enter a value for seconds, SAS assumes a value of 0.
The stored value is the
total number of seconds in the
time value.
input begin time10.;
Data Line |
Results |
Formatted with TIMEw. |
----+----1----+
|
|
|
12.56
|
46560
|
12:56:00
|
120:120
|
439200
|
122:00:00
|
1:13 pm
|
47580
|
13:13:00
|
Copyright © 2011 by SAS Institute Inc., Cary, NC, USA. All rights reserved.