I've got the following code, but this gives me whole numbers:
<?php
$datetime1 = new DateTime('2009-10-11 00:00:00');
$datetime2 = new DateTime('2009-10-11 00:00:10');
$interval = $datetime1->diff($datetime2);
echo $interval->format('%R%a days');
?>
How do I count days and show the decimal points to? In the example above, there is a difference of 10 seconds, how do I get it to display 0.000000something days?