art15 Posted May 1, 2008 Share Posted May 1, 2008 Hi, I am trying to calculate the difference in days. The first date being : $today= date("Y-m-d H:i:s"); the second date being $temp2="2008-03-21 10:56:18"; $days=$today-$temp2; echo floor($days/60*60*24); this echos 0 as the output. I cant figure out whats wrong. can someone suggest? Thanks Link to comment https://forums.phpfreaks.com/topic/103661-solved-difference-in-days/ Share on other sites More sharing options...
AndyB Posted May 1, 2008 Share Posted May 1, 2008 Try this - http://roshanbh.com.np/2008/03/finding-days-difference-php.html Link to comment https://forums.phpfreaks.com/topic/103661-solved-difference-in-days/#findComment-530808 Share on other sites More sharing options...
art15 Posted May 1, 2008 Author Share Posted May 1, 2008 Thanks for that it works Link to comment https://forums.phpfreaks.com/topic/103661-solved-difference-in-days/#findComment-530812 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.