make_date
function
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.
If any of the arguments is out of bounds, the function raises an error.
Note
If spark.sql.ansi.enabled is false
the function returns NULL
instead of an error for malformed arguments.