Add Days and Hours in date………

Posted: July 8, 2013 in Timing Function

$datetime = “2013-07-08 07:07:32”;

$days = ‘5’;
$hours = ‘3’;

$new_datetime = date(‘Y-m-d H:i:s’, strtotime(“+$days days $hours hours”, strtotime($datetime)));

echo $new_datetime;

Advertisements

Comments are closed.