There may be a better way, I'm not familiar enough with SQL, but this ought to work.
$memdate = mysql_result($memberdate, "membershipdate"); //pulls date from DB
$dbtimestamp = mktime(0,0,0,substr($memdate,0,4),substr($memdate,5,2),substr($memdate,8,2));
$difference = time() - $dbtimestamp;
$days = $difference / (60*60*24);
print "It has been $days days.";
I'm used to using the unix epoch, so thats how I did it.