I tried this formula and when I check it, I get an error that says a date id required here where I replared the fild for the date. Can you help???
WhileReadingRecords;
DateVar Birth:= {NC_05.DOB}; // Replace this with your field for Date Of Birth
DateVar Ann := CurrentDate; // 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
What is the datatype for your DOB field? You can run the mouse over it to see the tooltip text which will say whether it's a date, datetime, or string. If it is a string, please show some samples of the field and identify which characters represent days versus months.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.