php - Add days to a timestamp -
im trying add amount of days timestmp using in php:
$captureddate = '2008-06-20'; $enddate = strtotime($captureddate); $enddate2 = strtotime('+1 day',$enddate); echo $enddate2; but displaying: 1216526400
any ideas?
strtotime() converts date unix timestamp number of seconds since january 1st 1970. if want date output have run finished timestamp through date() first.
$captureddate = '2008-06-20'; $enddate = strtotime($captureddate.' +1 day'); echo date("y-m-d", $enddate);
Comments
Post a Comment