Php - Compare data and time and output the difference
Posted on 2012-09-21
Hi E's, I need to know how I compare two times and output th difference between them.
In practice I have two time, compose by the day and the hours:
$old_time = "2012-09-20";
$old_hour = "23:10:57"; //(hour:minutes:seconds)
$actual_time = "2012-09-21";
$actual_hour = "13:17:44"; //(hour:minutes:seconds)
$difference = "days:hours:minutes:seconds"; //difference between old time and actual time
How I get the result of $difference variable?
The best regards, JC