• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Time calculation between 2 dates

#4
@dave friend solution can be slightly simplify


PHP Code:
 $start = new DateTime("2017-03-09 09:26:00");
 
 $end = new DateTime("2017-03-11 09:25:00");
 
 $interval $start->diff($end);
 
 echo $interval->format('%h hours %i minutes %S seconds'); 
A good decision is based on knowledge and not on numbers. - Plato

Reply


Messages In This Thread
Time calculation between 2 dates - by sakthisiga - 03-30-2017, 12:25 AM
RE: Time calculation between 2 dates - by salain - 03-31-2017, 12:14 AM
RE: Time calculation between 2 dates - by salain - 03-31-2017, 06:10 AM
RE: Time calculation between 2 dates - by Narf - 03-31-2017, 07:19 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.