Writes time values as hours and decimal fractions of hours.
Category: |
Date and Time
|
Alignment: |
right
|
-
w
-
specifies the width of the output field.
-
d
-
specifies the number of digits to the right
of the decimal point in the hour value. Therefore, SAS prints decimal fractions
of the hour. This argument is optional.
Requirement: |
must be less than w |
Range: |
0-19 |
SAS rounds hours based on the value of
minutes in the SAS time value.
The HOUR format uses asterisks to format values that are outside the
time range 0-24 hours, such as datetime values.
The example table uses the input value of 41400, which
is the SAS time value that corresponds to 11:30 a.m.
SAS Statement |
Results |
|
----+----1
|
put time hour4.1;
|
11.5
|
|
Formats:
|
|
Functions:
|
|
Informat:
|
Copyright © 2011 by SAS Institute Inc., Cary, NC, USA. All rights reserved.