HOUR

 

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.

SQL Syntax:
 
   HOUR( time )
Time:
 
  Any date expression.
Escape Syntax:
 
  {fn HOUR( time )}
Return Type:
 
  INT
     

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


100% pure Java DBMS
Mirror Site