Getting started
User guides
Administration guides
Reference guides
Resources
Updated Aug 12, 2022
Send us feedback
hour
Returns the hour component of a timestamp.
hour(expr)
expr: A TIMESTAMP expression.
expr
An INTEGER.
This function is a synonym for extract(HOUR FROM expr).
extract(HOUR FROM expr)
> SELECT hour('2009-07-30 12:58:59'); 12
dayofmonth function
dayofweek function
dayofyear function
day function
minute function
extract function