Ok, so the formula on Ken Hamady's page reads as follows:
DateVar Birth:= {ages.Birth}; // Replace this with your field for Date Of Birth
DateVar Ann := {ages.DateAnn}; // Replace this with CurrentDate to get their age as of the time of the report
//or the date field of an event to get their age as of the time of that event.
if (Month(Ann) * 100) + Day (Ann) >=(Month(Birth) *100) + Day (Birth)
then Year (Ann) - Year(Birth)
else Year (Ann) - Year(Birth) -1
I have listed the formula as follows but it keeps telling me that I'm missing a date:
DateVar Birth:={vwGenPatInfo.Patient_DOB}; DateVar Ann:= date(2011,06,30);
if (Month(Ann)*100) + Day (Ann)>=(Month(Birth) *100) + Day (Birth)
then Year (Ann) - Year(Birth)
else Year (Ann) - Year(Birth) -1
Thank you!