I face a problem with the function DATE_ADD
in MySQL.
My request looks like this :
SELECT *
FROM mydb
WHERE creationdate BETWEEN "2011-01-01" AND DATE_ADD("2011-01-01", INTERVAL 6 MONTH)
GROUP BY MONTH(creationdate)
The problem is that, in the results, -I think- because June has only 30 days, the function doesn't work properly as I have the results of the first of July.
Is there a way to tell DATE_ADD
to work well and take the right number of days within a month?