Jump to content

Archived

This topic is now archived and is closed to further replies.

sun14php

Difference Between Two Times

Recommended Posts

HOW TO GET RESULT IN MINUTE OF DIFFRENCE BETWEEN TWO TIME FILEDS OF MYSQL USING PHP ?
IS THR ANY FUNCTION SUGGEST ME. MY SQL HAS TWO TIME COLUMN I WANT TO STORE RESULT OF DIFFRENCE BETWEEN THOSE TIMES COLUMN IN A THIRD COLUMN IN INTEGER.

Share this post


Link to post
Share on other sites
<?


$date1="010101";
$date2="030303";

$result=$date2-$date1;

echo $result;

?>


i tried this way round.

Share this post


Link to post
Share on other sites
[!--quoteo(post=389114:date=Jun 29 2006, 12:07 AM:name=redarrow)--][div class=\'quotetop\']QUOTE(redarrow @ Jun 29 2006, 12:07 AM) [snapback]389114[/snapback][/div][div class=\'quotemain\'][!--quotec--]
<?
$date1="010101";
$date2="030303";

$result=$date2-$date1;

echo $result;

?>
i tried this way round.
[/quote]

Reply from Sun14php:
I asked time difference not date difference ,that too in minutes . your post does not solve my problem.
& my time is in hh-mm-ss format.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.