DATE_ADD()
DATE_ADD() is a SQL function in the Date/Time Functions category. Adds a time interval to a date. Can use YEAR, MONTH, DAY, HOUR, MINUTE, SECOND. The syntax is DATE_ADD(date, INTERVAL value unit). It accepts date, INTERVAL value unit. It returns modified date. A typical example: SELECT DATE_ADD(CURDATE(), INTERVAL 7 DAY); -- Next week SELECT DATE_ADD(NOW(), INTERVAL 1 HOUR); -- 1 hour later SELECT DATE_ADD(order_date, INTERVAL 30 DAY); -- 30 days after order A close relative is NOW(), which returns the current date and time as a timestamp. A close relative is CURDATE(), which returns the current date without time. A close relative is DATE(), which extracts the date part from a datetime expression. More about this category: Date and time functions — NOW, DATE, EXTRACT, DATEDIFF, DATE_ADD, DATE_FORMAT. Related Date/Time Functions entries: NOW(), CURDATE(), DATE(), EXTRACT(), DATE_SUB(), DATEDIFF(), DATE_FORMAT(), STR_TO_DATE().