Roy Barten Posted February 18, 2009 Share Posted February 18, 2009 Hello, I have 2 dates a startdate, and a enddate. I need to know how many hours are between this 2 dates. How do i calculate this? $enddate - $startdate???? Please help! Quote Link to comment https://forums.phpfreaks.com/topic/145703-solved-datedif-function/ Share on other sites More sharing options...
cola Posted February 18, 2009 Share Posted February 18, 2009 ($enddate - $startdate) * 24 Quote Link to comment https://forums.phpfreaks.com/topic/145703-solved-datedif-function/#findComment-764994 Share on other sites More sharing options...
PFMaBiSmAd Posted February 18, 2009 Share Posted February 18, 2009 It would really depend on what format the dates are in and where they are stored (database or just php variables.) Quote Link to comment https://forums.phpfreaks.com/topic/145703-solved-datedif-function/#findComment-764996 Share on other sites More sharing options...
Roy Barten Posted February 18, 2009 Author Share Posted February 18, 2009 Just variables from an array Quote Link to comment https://forums.phpfreaks.com/topic/145703-solved-datedif-function/#findComment-764997 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.