jd2007 Posted July 27, 2007 Share Posted July 27, 2007 How can i find the difference of two dates in seconds ? Link to comment https://forums.phpfreaks.com/topic/62023-how-can-i-find-the-difference-of-two-dates-in-seconds/ Share on other sites More sharing options...
Lumio Posted July 27, 2007 Share Posted July 27, 2007 <?php $date1 = strtotime('2004-12-5'); $date2 = strtotime('2003-12-5'); $dif = $date1 - $date2; echo $dif; ?> Link to comment https://forums.phpfreaks.com/topic/62023-how-can-i-find-the-difference-of-two-dates-in-seconds/#findComment-308790 Share on other sites More sharing options...
dg Posted July 27, 2007 Share Posted July 27, 2007 $sDiff = strtotime('2007-01-27') - strtotime('2007-01-26'); echo $sDiff Link to comment https://forums.phpfreaks.com/topic/62023-how-can-i-find-the-difference-of-two-dates-in-seconds/#findComment-308791 Share on other sites More sharing options...
Lumio Posted July 30, 2007 Share Posted July 30, 2007 dg ... are you serious? Or is it just a quick copy of my post -.- Link to comment https://forums.phpfreaks.com/topic/62023-how-can-i-find-the-difference-of-two-dates-in-seconds/#findComment-311199 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.