Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
21 views1 page

With Is For Function Is For For On For Select Select

ADDDATE() is a synonym for DATE_ADD() that adds a date interval or number of days to a given date. It allows specifying the second argument as either an INTERVAL expression to add a time period, or as a number of days to add. SUBDATE() is also a synonym for DATE_SUB() that subtracts from a date.

Uploaded by

Irwan Bros
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views1 page

With Is For Function Is For For On For Select Select

ADDDATE() is a synonym for DATE_ADD() that adds a date interval or number of days to a given date. It allows specifying the second argument as either an INTERVAL expression to add a time period, or as a number of days to add. SUBDATE() is also a synonym for DATE_SUB() that subtracts from a date.

Uploaded by

Irwan Bros
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 1

Syntax:

ADDDATE(date,INTERVAL expr unit), ADDDATE(expr,days)


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('2008-01-02', INTERVAL 31 DAY);
-> '2008-02-02'
mysql> SELECT ADDDATE('2008-01-02', INTERVAL 31 DAY);
-> '2008-02-02'
When invoked with the days form of the second argument, MySQL treats it
as an integer number of days to be added to expr.
URL: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html

You might also like