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
Here is the simplest solution to your query
$date=date_create("2013-03-15"); // or your date string date_add($date,date_interval_create_from_date_string("40 days"));// add number of days echo date_format($date,"Y-m-d"); //set date format of the result