View Full Version : Subtracting Time Problem
11-12-2010, 09:34 AM
i have a two time values
$diff= $from -$to ...........
how do i do this ..... and also i want get answer as minites
plzzzzzz help me for solve this
11-12-2010, 09:47 AM
I'm not sure if there's an inbuilt function or something. But i'd use seconds to do the math then write a function to turn it into a string of a time format. Then there is this http://php.net/manual/en/function.strtotime.php if you want an actual time stamp....but then I always do stuff the hard way :P
11-12-2010, 10:25 AM
if your php >= 5.3 you can use date_diff (http://php.net/manual/en/function.date-diff.php) function :)
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.