Syntax
ADDDATE(date, INTERVAL expr unit)
ADDDATE(expr, days)
Popis
PrÃkaz jazyka sql
When invoked with the INTERVAL form of the second argument, ADDDATE() is a synonym for DATE_ADD(). The related function SUBDATE() is a synonym for DATE_SUB(). For information on the INTERVAL unit argument, see the discussion for DATE_ADD().
mysql>
SELECT DATE_ADD
('1998-01-02', INTERVAL 31 DAY
) FROM dual;
->
'1998-02-02'
mysql>
SELECT ADDDATE('1998-01-02', INTERVAL 31 DAY
) FROM dual;
->
'1998-02-02'
As of MySQL 4.1.1, the second syntax is allowed. When invoked with the days form of the second argument, MySQL treats it as an integer number of days to be added to expr.