Menu
I am trying to do a date test on values coming back from an MySql database…here is my code…
while ($row = mysql_fetch_array($result))
{
$signUpDate = date(“m/d/Y”,strtotime($row[‘signupdate’]));
$lastLeadDate = date(“m/d/Y”,strtotime($row[‘lastleaddate’]));
$dateDiff = $signUpDate – $lastLeadDate;
$fullDays = floor($dateDiff/(60*60
echo “<br/>”;
echo $signUpDate ;
echo “<br/>”;
echo $lastLeadDate;
echo “<br/>”;
echo $dateDiff;
echo “<br/>”;
echo $fullDays;
}
here is my results
06/08/2010
01/01/2011
5
I am not sure why I am getting the “5” which I assume is the diff in months