sun14php Posted June 29, 2006 Share Posted June 29, 2006 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. Quote Link to comment https://forums.phpfreaks.com/topic/13176-difference-between-two-times/ Share on other sites More sharing options...
redarrow Posted June 29, 2006 Share Posted June 29, 2006 <?$date1="010101";$date2="030303";$result=$date2-$date1;echo $result;?>i tried this way round. Quote Link to comment https://forums.phpfreaks.com/topic/13176-difference-between-two-times/#findComment-50684 Share on other sites More sharing options...
sun14php Posted June 29, 2006 Author Share Posted June 29, 2006 [!--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. Quote Link to comment https://forums.phpfreaks.com/topic/13176-difference-between-two-times/#findComment-50702 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.