MySQL's now() +1 day

Qiao picture Qiao · Oct 8, 2010 · Viewed 337.7k times · Source

I'm using now() in MySQL query.

INSERT INTO table SET data = '$data', date = now()

But I want to add 1 day to this date (so that date should contain tomorrow).
Is it possible?

Answer

Mark Byers picture Mark Byers · Oct 8, 2010

You can use:

NOW() + INTERVAL 1 DAY

If you are only interested in the date, not the date and time then you can use CURDATE instead of NOW:

CURDATE() + INTERVAL 1 DAY