>SELECT person_id, SUM(monthdiff(effdate,expdate)) AS months ; > FROM yourtable INTO CURSOR whatever WHERE NOT EMPTY(effdate) ; > AND NOT EMPTY(expdate) GROUP BY person_id > >FUNCTION monthdiff >PARAMETERS dStartDate, dStopDate >LOCAL nStartYear, nStopYear, nStartMonth, nStopMonth >nStartYear = YEAR(dStartDate) >nStopYear = YEAR(dStopDate) >nStartMonth = MONTH(dStartDate) >nStopMonth = MONTH(dStopDate) >nMonths = (12*(nStopYear-nStartYear))+(nStopMonth-nStartMonth) >RETURN nMonths >>If you wish to round off months differently, you can tweak the monthdiff function, using other native VFP date functions.