Here's a test program that seems to work:
Code:
$field1 = "2012-08-03";
$field2 = "2010-08-03";
$last_meeting = strtotime($field1);
if (($t = strtotime($field2)) AND ($t > $last_meeting))
{
$last_meeting = $t;
}
if ($last_meeting)
{
$days_left = intval(365 - ((time() - $last_meeting) / 86400)) + 1;
echo "$days_left days left in membership";
}
else
{
echo "Failed to find any valid meeting dates";
}
(Of course this just shows the calculation, you'll need to change it to use your profile fields and do something with the value other than echo it).