make_date
function
Applies to: Databricks SQL Databricks Runtime
Creates a date from year
, month
, and day
fields.
Arguments
year
: An INTEGER expression evaluating to a value from 1 to 9999.month
: An INTEGER expression evaluating to a value from 1 (January) to 12 (December).day
: An INTEGER expression evaluating to a value from 1 to 31.
Returns
A DATE.
In Databricks SQL, if any of the arguments is out of bounds, the result is NULL
.
In Databricks Runtime, if any of the arguments are out of bounds, the function returns an error unless spark.sql.ansi.enabled is false
, in which case the function returns NULL
.