Pedro Chagas
asked on
Php - Compare data and time and output the difference
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:second s"; //difference between old time and actual time
How I get the result of $difference variable?
The best regards, JC
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:second
How I get the result of $difference variable?
The best regards, JC
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Open in new window