Cstr$(Year(Today()) - Year(BIRTHDAY) - if(DateToJulian(DateYMD(1, Month(Today()), Day(Today()))) - DateToJulian(DateYMD(1, Month(BIRTHDAY), Day(BIRTHDAY))) < 0,1,0), "%25.0f")
You can use this expression in reports to print persons’ ages when just knowing their birthday.
This expression considers automatically whether the birthday already has happened this year or not. This may not be useful when being used for “Happy Birthday” cards, because there you’ll need the “new” age, not the current. For this purpose use the following expression:
Cstr$(Year(Today()) - Year(BIRTHDAY), "%25.0f")