Canman2005 Posted October 18, 2009 Share Posted October 18, 2009 Hi all I have 2 vars set $start = '2009-10-02 12:34:44'; $end = '2009-10-03 13:34:44'; how can I work out the total hours betwen those 2 dates, so with the above it would output 25 thanks for any help Link to comment https://forums.phpfreaks.com/topic/178112-solved-total-hours-between-2-dates/ Share on other sites More sharing options...
Garethp Posted October 18, 2009 Share Posted October 18, 2009 $start = strtotime($start); $end = strtotime($end); $between = $end - $start; $between /= 360; echo $between; I may be off on the 360. Just adjust it my multiples of 60 till you get it right Link to comment https://forums.phpfreaks.com/topic/178112-solved-total-hours-between-2-dates/#findComment-939113 Share on other sites More sharing options...
Canman2005 Posted October 18, 2009 Author Share Posted October 18, 2009 thanks dude, it was 3600 Link to comment https://forums.phpfreaks.com/topic/178112-solved-total-hours-between-2-dates/#findComment-939114 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.