Reputation: 247
I want to add 2 months and 2 years to the current date but for some reason i cannot get it to work.
Select DATE_ADD(NOW(), INTERVAL 2 MONTH, INTERVAL 2 YEAR);
Upvotes: 7
Views: 6047
Reputation: 143
You could also just use addition
SELECT NOW() + INTERVAL 2 YEAR + INTERVAL 2 MONTH
Upvotes: 13
Reputation: 1269443
Try using date_add()
twice:
Select DATE_ADD(DATE_ADD(NOW(), INTERVAL 2 MONTH), INTERVAL 2 YEAR);
Or once:
Select DATE_ADD(NOW(), INTERVAL 14 MONTH);
Upvotes: 6