HOUR() — Returns the hour of the day as an integer value.
HOUR( timestamp-value )
The HOUR() function returns an integer value between 0 and 23 representing the hour of the day in a timestamp value. This function produces the same result as using the HOUR keyword with the EXTRACT() function.
The following example uses the HOUR(), MINUTE(), and SECOND() functions to return the time portion of a TIMESTAMP value in a formatted string.
SELECT eventname, CAST(HOUR(starttime) AS VARCHAR) || ' hours, ' || CAST(MINUTE(starttime) AS VARCHAR) || ' minutes, and ' || CAST(SECOND(starttime) AS VARCHAR) || ' seconds.' AS timestring FROM event;