HOURw.d Format

Writes SAS time values as hours and decimal fractions of hours.

Category: Date and Time
Alignment: Right

Syntax

HOURw.[d]

Arguments

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.

Range 0–19
Requirement must be less than w

Details

SAS rounds hours based on the value of minutes in the SAS time value.

Example

The example table uses the input value of 41400, which is the SAS time value that corresponds to 11:30 AM.
Statements
Results
 
----+----1
select put(41400,hour4.1);
11.5
Last updated: February 23, 2017