dayofyear function (Databricks SQL)

Returns the day of year of the date or timestamp.

Syntax

dayofyear(expr)

Arguments

  • expr: A DATE or TIMESTAMP expression.

Returns

An INTEGER.

This function is a synonym for extract(DAY FORM expr).

Examples

> SELECT dayofyear('2016-04-09');
 100