Skip to content

DATE_ADD

  • date: A valid date expression. This parameter represents the starting point. MySQL will add time to this date.
  • interval expr type: A combination of two parameters. ‘expr’ is the value that you want to add. ‘type’ is the type of interval that the ‘expr’ should be interpreted as. The possible types are SECOND, MINUTE, HOUR, DAY, WEEK, MONTH, QUARTER, or YEAR.
SELECT DATE_ADD('2022-01-01', INTERVAL 5 DAY) as NewDate;
+------------+
| NewDate |
+------------+
| 2022-01-06 |
+------------+

The DATE_ADD() function is used to add a specified time interval to a date in MySQL. In the provided example, five days are added to the date ‘2022-01-01’. As the result, a new date ‘2022-01-06’ is returned.