Chapter Contents

Previous

Next
HOURw.d

HOURw.d



Writes time values as hours and decimal fractions of hours

Category: Date and Time
Alignment: right


Syntax
Syntax Description
Details
Examples
See Also

Syntax

HOURw.d

Syntax Description

w
specifies the width of the output field.
Default: 2
Range: 2-20

d
optionally specifies the number of digits to the right of the decimal point in the hour value. Therefore, SAS prints decimal fractions of the hour.
Requirement: must be less than w
Range: 0-19


Details

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


Examples

The example table uses the input value of 41400, which is the SAS time value that corresponds to 11:30 AM.

SAS Statements Results

----+----1
put time hour4.1;
11.5


See Also

Formats:

HHMMw.d
MMSSw.d
TIMEw.d
TODw.d

Functions:

HMS
HOUR
MINUTE
SECOND
TIME

Informat:

TIMEw.


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.