| Parameter | Type |
|---|---|
dateValue | datetimestamp, datetime, date, time, gyear, gyearmonth |
quantity | integer |
units | string |
Returns: date
Example
query:
SELECT DATE_ADD(CAST("2018-01-02" AS DATE), 1, "day")
results:
| date_add |
|---|
| 2018-01-03 |
The date function used to add some period of duration to a date or datetime value. Takes three arguments, the original date, a number of units of duration to add, and the unit of duration (one of "year", "decade", "century", "quarter", "month", "week", "day", "hour", "minute", "second", or "millisecond").
| Parameter | Type |
|---|---|
dateValue | datetimestamp, datetime, date, time, gyear, gyearmonth |
quantity | integer |
units | string |
query:
SELECT DATE_ADD(CAST("2018-01-02" AS DATE), 1, "day")
results:
| date_add |
|---|
| 2018-01-03 |