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

SQL Anywhere 10.0.1 » SQL Anywhere Server - SQL Reference » SQL Functions » Alphabetical list of functions

HEXTOINT function [Data type conversion] Next Page

HOUR function [Date and time]

Returns the hour component of a datetime.


HOUR( datetime-expression )


datetime-expression    The datetime.


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

Standards and compatibility

The following statement returns the value 21:

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