Chapter Contents

Previous

Next
HHMMw.d

HHMMw.d



Writes time values as hours and minutes in the form hh:mm

Category: Date and Time
Alignment: right


Syntax
Syntax Description
Details
Comparisons
Examples
See Also

Syntax

HHMMw.d

Syntax Description

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

d
optionally specifies the number of digits to the right of the decimal point in the minutes value.
Requirement: must be less than w
Range: 1-19


Details

The HHMMw.d format writes SAS datetime values in the form hh:mm, where

hh
is the number of hours that range from 00 through 23.

mm
is the number of minutes that range from 00 through 59.

SAS rounds hours and minutes that are based on the value of seconds in a SAS time value.


Comparisons

The HHMMw.d format is similar to the TIMEw.d format except that the HHMMw.d format does not print seconds.


Examples

The example table uses the input value of 46796, which is the SAS time value that corresponds to 12:59:56 PM.

SAS Statements Results

----+----1
put time hhmm.;
13:00

SAS rounds up the time value four seconds based on the value of seconds in the SAS time value.

See Also

Formats:

HOURw.d
MMSSw.d
TIMEw.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.