Page 1 of 1

Finding # of Days between two timestamps

Posted: Mon Aug 13, 2007 12:59 am
by LiveFree
Hello All,

For some reason, I have never been good when it comes to manipulating date information.

So...

I have 2 timestamps:

Code: Select all

<?php
$start = strtotime('SomeDateInthePast');
$end = time();

$time_between = $end - $start;
?>
Now, how would I find the number of days $time_between is.

I've tired dividing it by 60 and then by 24, and multiplying it by 60 and then 24, but nothing works.

Any Thoughts?
Thanks in Advance

Posted: Mon Aug 13, 2007 1:42 am
by VladSun
... I've tired dividing it by 60 and then by 24...
You have to divide by another 60 (that's for seconds):

viewtopic.php?t=71617