Page 1 of 1
Adding Days To A Date
Posted: Wed Dec 14, 2005 3:18 pm
by icesolid
OK, I need to take the current date and add 24 days onto it. How would I do that so the months and days all make sense? I mean I could break out the day of the month, but I don’t understand how to make it change to the next month.
Posted: Wed Dec 14, 2005 3:21 pm
by John Cartwright
This may be useful to you
Code: Select all
//whatever your date in timestamp is
$currentTime = time();
$futurDate = strtotime('+24 days', $currentTime);
echo date('M-d-Y', $futurDate);
Posted: Wed Dec 14, 2005 4:29 pm
by Burrito
Code: Select all
echo date("m/d/Y",strtotime("+24 days"));