Get started
Load & manage data
Work with data
Administration
Reference & resources
CLUSTER BY
mask
ROW FILTER
Updated Dec 17, 2024
Send us feedback
hour
Applies to: Databricks SQL Databricks Runtime
Returns the hour component of a timestamp. This function is a synonym for extract(HOUR FROM expr).
extract(HOUR FROM expr)
hour(expr)
expr: A TIMESTAMP expression.
expr
An INTEGER.
> SELECT hour('2009-07-30 12:58:59'); 12
dayofmonth function
dayofweek function
dayofyear function
day function
minute function
extract function