<?php
//echo $date = date("Y-m-d H:i:s");echo "\n";
echo $date = "2011-08-26 10:34:16";echo "\n";
$original = strtotime($date); // To UNIX_TIME_STAMP
$hr = 25;
$min = 46;
$sec = 77;
$modified = $original+$sec+($min*60)+($hr*60*60);
echo date("Y-m-d H:i:s",$modified);echo "\n";
/*
kesavan@Ideapad-Z460:/var/www/kesavan.info/scripts$ php datediff.php
2011-08-26 10:34:16
2011-08-27 12:21:33
kesavan@Ideapad-Z460:/var/www/kesavan.info/scripts$
*/
/*
//$original = mktime(date("H", strtotime($date)), date("i", strtotime($date)), date("s", strtotime($date)),
// date("m", strtotime($date)), date("d", strtotime($date)), date("Y", strtotime($date)));
*/
?>
Return to Kesavan Muthuvel's home page. Please send comments on these web pages to hi@kesavan.info (or) Feedback here CopyLeft (Ͻ) 2008 - 2023 Kesavan Muthuvel More on CopyLeft |