0

my firstvariable is and second variable is

$one=07:54:PM;
$two=07:55:AM;


I am suffering from getting difference in munutes

any body help me result in minutes.

Edited by deceptikon: Moved to PHP forum.

2
Contributors
5
Replies
26
Views
2 Years
Discussion Span
Last Post by DaveAmour
2

Does this kind of thing help?

$start_date = new DateTime('2007-09-01 04:10:58');

$since_start = $start_date->diff(new DateTime('2012-09-11 10:25:00'));

echo $since_start->i.' minutes<br>';
Votes + Comments
Yay, you got the answer. :D
0

Actually my joke about it being 1 minute is way off as just noticed one time is AM and the other is PM!

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.