Reputation: 23
I have a db column called timestamp which is exactly what it holds. I want to get the sum of the timestamp and 10 days. How will that query look?
In other words how can I say this in:
SHOW ME THE RESULT OF TIMESTAMP + 10 DAYS;
in working sql syntax of course :)
Upvotes: 1
Views: 340
Reputation: 5389
Try this:
SELECT DATE_ADD(`timestamp`, INTERVAL 10 DAY) FROM `table`;
Upvotes: 0
Reputation: 444
I think what you want is something like:
SELECT DATE_ADD(NOW(),INTERVAL 10 day);
http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html#function_date-add
Upvotes: 1