Page 1 of 1

Date Subtraction

Posted: Tue Jun 12, 2007 1:48 pm
by guitarlvr
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?

Code: Select all

<?php
$today = date('m-d');
$bday = '06-15';
$diff = ($bday - $today) / 86400;
echo $diff;
?>
Thanks in advance!

Wayne

Posted: Tue Jun 12, 2007 2:59 pm
by guitarlvr
Never mind, I'm going a different direction. Thanks.

Wayne