Date Subtraction
Posted: Tue Jun 12, 2007 1:48 pm
I'm trying to subtract two month and days to get how many days they are apart. the following code displays 0. Could someone please point me in the right direction?
Thanks in advance!
Wayne
Code: Select all
<?php
$today = date('m-d');
$bday = '06-15';
$diff = ($bday - $today) / 86400;
echo $diff;
?>Wayne