Hi all,
I am trying to get amount of how many weeks and how many months and years from 2 dates and this is what i have atmm
$today=date("20100317");
$joineddate=date("20010121");
$Query="SELECT DATEDIFF($today)-DATEDIFF($joineddate) FROM members WHERE username='$username'";
echo $Query;
$result = mysqli_query($con,$Query);
if(!$result)
{
mysqli_error($con);
}
if($result)
{
$days = mysqli_fetch_array($result);
return $days[0];
}
Its not working the way i want though am i doing somthing wrong,
Any help would be good,Thanks