Get started
Load & manage data
Work with data
Administration
Reference & resources
CLUSTER BY
mask
ROW FILTER
Updated Dec 17, 2024
Send us feedback
dayname
Applies to: Databricks Runtime 16.1 and later
Returns the three-letter English acronym for the day of the week for the given date.
dayname(expr)
expr: A DATE or TIMESTAMP expression.
expr
DATE
TIMESTAMP
A STRING.
STRING
One of: ‘Mon’, ‘Tue’, ‘Wed’, ‘Thu’, ‘Fri’, ‘Sat’, ‘Sun’.
> SELECT dayname(DATE'2024-11-01' + CAST(offset AS INT)) AS days FROM range(8) AS t(offset); Fri Sat Sun Mon Tue Wed Thu Fri
day function
dayofmonth function
dayofweek function
dayofyear function
hour function
minute function
second function
extract function