What's wrong with these two queries?
SELECT (DATE_ADD('2008-11-31',INTERVAL 365 DAY) + INTERVAL 0 DAY) as occursOn
Result:
(
[0] => Array
(
[occursOn] =>
)
)
And:
SELECT (DATE_ADD('2008-11-31',INTERVAL 730 DAY) + INTERVAL 0 DAY) as occursOn
Result:
(
[0] => Array
(
[occursOn] =>
)
)
As you can see, the returned value of occursOn
is blank each time.
These queries are being generated dynamically, therefore the second +INTERVAL 0 DAY
is needed and can't be eliminated.
2008-11-31 not valid date only 30 days in 11th month (November)
Probably because November
has 30
days?