Get started
Load & manage data
Work with data
Administration
Reference & resources
CLUSTER BY
mask
ROW FILTER
Updated Nov 21, 2024
Send us feedback
dayofyear
Applies to: Databricks SQL Databricks Runtime
Returns the day of year of the date or timestamp. This function is a synonym for extract(DAY FORM expr).
extract(DAY FORM expr)
dayofyear(expr)
expr: A DATE or TIMESTAMP expression.
expr
An INTEGER.
> SELECT dayofyear('2016-04-09'); 100
day function
dayofmonth function
dayofweek function
hour function
minute function
second function
extract function
weekday function