Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 11.0.1 » UltraLite - Database Management and Reference » UltraLite SQL Reference » UltraLite SQL functions » SQL functions (E-O)

 

HOUR function [Date and time]

Returns the hour component of a datetime.

Syntax
HOUR( datetime-expression )
Parameters
  • datetime-expression   The datetime.

Returns

SMALLINT

Remarks

The value returned is a number from 0 to 23 corresponding to the datetime hour.

Standards and compatibility
  • SQL/2003   Vendor extension.

Example

The following statement returns the value 21:

SELECT HOUR( '1998-07-09 21:12:13' );