Jump to content


Photo

Difference Between Two Times


  • Please log in to reply
2 replies to this topic

#1 sun14php

sun14php
  • Members
  • PipPip
  • Member
  • 19 posts

Posted 29 June 2006 - 04:53 AM

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.

#2 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 29 June 2006 - 05:07 AM

<?


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

$result=$date2-$date1;

echo $result;

?>


i tried this way round.
Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc

#3 sun14php

sun14php
  • Members
  • PipPip
  • Member
  • 19 posts

Posted 29 June 2006 - 06:03 AM

[!--quoteo(post=389114:date=Jun 29 2006, 12:07 AM:name=redarrow)--][div class=\'quotetop\']QUOTE(redarrow @ Jun 29 2006, 12:07 AM) View Post[/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.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users