Hi! all,

I want difference between two date which results into HH:MM:SS.
date format: MM/DD/YYYY HH:MM:SS

suppose there are two date 09/14/2009 13:00:00,
09/18/2009 13:00:00
the difference between the above will return not 4 days rather difference in 96:00:00 .

thanks in advance

Regards,
Manoj

hi

i understood that u need the date difference in hours..

so here it is..

$date_diff = $today_date - $prev_date;
$fullhours = floor($date_diff/3600);
echo "<br>".$fullhours;

2009-09-25 (minus) 2009-09-21 (equals) 96 Hrs

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.