HMS Function

Returns a SAS time value from hour, minute, and second values.

Category: Date and Time
Returned data type: DOUBLE

Syntax

Arguments

hour

specifies a numeric expression that represents an integer from 1 through 12.

Data type DOUBLE
See <sql-expression>
FedSQL Expressions

minute

specifies a numeric expression that represents an integer from 1 through 59.

Data type DOUBLE
See <sql-expression>
FedSQL Expressions

second

specifies a numeric expression that represents an integer from 1 through 59.

Data type DOUBLE
See <sql-expression>
FedSQL Expressions

Details

The HMS function returns a numeric value that represents a SAS time value. A SAS time value is a number that represents the number of seconds since midnight of the current day.

Example

The following statements illustrate the HMS function:
Statements
Results
select hms(12,45,10);
45910
select put(hms(12,45,10), time.);
12:45:10
Last updated: February 23, 2017