Issue
How can I select a current date and add 5 day?
I have the current date with some like:
select date_format(now(),'%d-%m-%Y') as date_now;
And I need the date with 5 day add, and I have ( with error):
select date_format(now(),'%d-%m-%Y', interval 5 day) as date_5_day;
How can I add 5 day to the current date?
Solution
Try CURDATE() – function that retrieves the current date without time information.
SELECT DATE_ADD(CURDATE(), INTERVAL 5 DAY);
CURDATE() reference: http://www.w3schools.com/sql/func_curdate.asp
Answered By – horsefeathers
Answer Checked By – Candace Johnson (BugsFixing Volunteer)