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.

Recommended Answers

All 5 Replies

Gud answer DaveAmour,
i want php code any body help me

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>';
commented: Yay, you got the answer. :D +0

Excellent DaveAmour.

Very thanx

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.