Jump to content

[SOLVED] Trying to find difference in hours- edit code from days to hours?


kernelgpf

Recommended Posts

Here's my code- I'm trying to find the difference in hours between one date from another, and my code currently finds the difference in days- could somebody edit the code to use hours instead of days?

 

$expirationdate[0] = $row3[datetillcompletion];
$startdate[0] = date('Y-m-d');

$startdate = strtotime($startdate[0]);
$expirationdate = strtotime($expirationdate[0]);
$delta = $expirationdate - $startdate;

$final=round($delta/86400);

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.