Time Difference Using PHP and Mysql

by raveendran 2010-01-27 18:27:37


Finding Time Difference using php and mysql
<?php
$dt1="2010-1-27 00:00:00"; //yr-mon-date hr:min:sec
$dt2="2010-1-30 00:00:00";
$row=mysql_query("select timediff('$dt2','$dt1')");
$result=mysql_result($row,0);
echo $result;
?>

Result : 72:00:00

Tagged in:

944
like
0
dislike
0
mail
flag

You must LOGIN to add comments