The HOUR function returns the hour part of a value.
The schema is SYSIBM.
If expression is a character string, it must not be a CLOB and its value must be a valid string representation of a datetime value. For the valid formats of string representations of datetime values, see "String representations of datetime values" in "Datetime values".
If expression is an exact numeric value, it must be a time duration or timestamp duration. For information about valid time durations and timestamp durations, see "Datetime operands and durations".
Only Unicode databases support an expression that is a valid graphic string representation of a datetime value that is not a DBCLOB. The graphic string is converted to a character string before the function is executed.
The result of the function is a large integer. If the argument can be null, the result can be null; if the argument is null, the result is the null value.
SELECT * FROM CL_SCHED
WHERE HOUR(STARTING) BETWEEN 12 AND 17