Quick Ref.
Compatibility
HOUR(d)
Engine OK Alternative
ingres no EXTRACT(HOUR FROM (d)
mysql yes EXTRACT(HOUR FROM d)
oracle no TO_CHAR(d,'HH24')
postgres no EXTRACT(HOUR FROM (d)
sqlserver yes DATEPART(HOUR,d)

HOUR

HOUR allows you to retrieve the hour from a datetime.

 HOUR(d)

In this example you get the hour from the datetime field whn.


Results
See also: