Returns a number from 0 to 23 corresponding to the hour component of the specified date/time.
HOUR ( datetime-expression )
Parameter
Definition
datetime-expression
The date/time.
SMALLINT
The following statement returns the value 21:
SELECT HOUR( '1998-07-09 21:12:13' ) FROM iq_dummy
SQL—Vendor extension to ISO/ANSI SQL grammar.
Sybase—Not supported by Adaptive Server Enterprise.