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! 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 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.) 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 Link to comment https://forums.phpfreaks.com/topic/145703-solved-datedif-function/#findComment-764997 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.