Get started
Load & manage data
Work with data
Administration
Reference & resources
Updated Mar 29, 2023
Send us feedback
quarter
Applies to: Databricks SQL Databricks Runtime
Returns the quarter of the year for expr in the range 1 to 4.
expr
quarter(expr)
expr: A DATE or TIMESTAMP expression.
An INTEGER.
This function is a synonym for extract(QUARTER FROM expr).
extract(QUARTER FROM expr)
> SELECT quarter('2016-08-31'); 3
day function
dayofweek function
dayofyear function
extract function
month function