dateadd
(days) function
Applies to: Databricks SQL preview Databricks Runtime 11.3 LTS and above
Returns the date numDays
after startDate
. This function is a synonym for date_add (days) function.
Syntax
dateadd(startDate, numDays)
Arguments
startDate
: A DATE expression.numDays
: An INTEGER expression.
Returns
A DATE.
If numDays
is negative abs(num_days)
are subtracted from startDate
.
If the result date overflows the date range the function raises an error.
To add units other than days use dateadd(unit, value, expr).
Examples
> SELECT dateadd('2016-07-30', 1);
2016-07-31