HOURw.d Format

Writes time values as hours and decimal fractions of hours.
Category: Date and Time
Alignment: right

Syntax

HOURw.d

Syntax Description

w
specifies the width of the output field.
Default:2
Range:2–20
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.
Range:0-19
Requirement:must be less than w

Details

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.

Example

The example table uses the input value of 41400, which is the SAS time value that corresponds to 11:30 a.m.
SAS Statement
Result
 
----+----1
put time hour4.1;
11.5

See Also

Functions:
HMS Function in SAS Functions and CALL Routines: Reference
HOUR Function in SAS Functions and CALL Routines: Reference
MINUTE Function in SAS Functions and CALL Routines: Reference
SECOND Function in SAS Functions and CALL Routines: Reference
TIME Function in SAS Functions and CALL Routines: Reference
Informats: