The function HOUR returns an integer in the range of 0 to 23. This integer represent the count of hours since beginning of the day. If you use it with a date data type then it return ever 0.
Examples:
SELECT HOUR({ts '2006-01-01 11:25:59'}), {fn hour({t '2:12:34'})}
Returns: 11, 2
see also: SQL Date Time Functions MINUTE
Mirror Site