Back

Explore Courses Blog Tutorials Interview Questions
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.4k 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
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)
Welcome to Intellipaat Community. Get your technical queries answered by top developers!

28.4k questions

29.7k answers

500 comments

94.2k users

Browse Categories

...