0 votes
1 view
in SQL by (20.3k points)

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?

1 Answer

0 votes
by (40.3k points)

Try this code:

NOW() + INTERVAL 1 DAY

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

CURDATE() + INTERVAL 1 DAY

Related questions

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
asked Jul 19, 2019 in SQL by Tech4ever (20.3k points)
0 votes
1 answer
asked Jul 19, 2019 in SQL by Tech4ever (20.3k points)
0 votes
1 answer
asked Jul 15, 2019 in SQL by Tech4ever (20.3k points)
Welcome to Intellipaat Community. Get your technical queries answered by top developers !


Categories

...