For Crystal 8.5, and assuming that you want to measure whole years from the date of birth to current, I'd do it by formula fields:
a) First find the difference in months, @Months:
DateDiff("m", {birth.date}, currentdate)
b) Convert this to whole years @WholeYears
Truncate((@Months/12, 0)
c) Check for birthdays in the current month but ahead of the current date, to get @TrueYears
If Datepart("m", {birth.date}) = Datepart("m", currentdate)
and Datepart("d", {birth.date}) > Datepart("d", currentdate)
then @WholeYears-1
else @WholeYears
d) Test @TrueYears for age-band
If @TrueYears < 18 then "Less than 18"
else if @TrueYears < 23 then "18-22"
etc.
d) Test @TrueYears for age-band
if isnull ({birth.date}) then "Birthdate not known"
else if @TrueYears < 18 then "Less than 18"
else if @TrueYears < 23 then "18-22"
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.