Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
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.7k 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
2 answers
0 votes
1 answer
asked Jan 5, 2021 in SQL by Appu (6.1k points)
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 15, 2019 in SQL by Tech4ever (20.3k points)

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...