HOUR Function

Returns the hour from a time or datetime value.

Category: Date and Time
Returned data type: TINYINT

Syntax

HOUR(time | datetime)

Arguments

time

specifies any valid expression that represents a time value.

Data type TIME
See FedSQL Expressions

datetime

specifies any valid expression that represents a datetime value.

Data type TIMESTAMP
See FedSQL Expressions

Example

The following statement illustrates the HOUR function:
Statements
Results
select hour(endtime) from custonline;
10
22
19
12
12
16
15
11
10
 9
select hour(current_time);
14
Last updated: February 23, 2017