I have a date returned as part of a mySQL query in the form 2010-09-17
2010-09-17
I would like to set the variables $Date2 to $Date5 as follows:
$Dat
From PHP 5.2 on you can use modify with a DateTime object:
http://php.net/manual/en/datetime.modify.php
$Date1 = '2010-09-17'; $date = new DateTime($Date1); $date->modify('+1 day'); $Date2 = $date->format('Y-m-d');
Be careful when adding months... (and to a lesser extent, years)