This is my first time posting. I have looked through other forums and have found this one to be the best.
I had been looking for a function to calculate age in Crystal Reports help and the Crystal Decisions website with no luck. I came up with the following formula that seems to work fairly well so I hope it helps others.
Truncate((DateDiff ("d", {Patient.Birthdate}, CurrentDate) / 365.25))
It is necessary to use the Truncate() function, as opposed to the Round() function, because the Truncate() will drop everything to the right of the decimal while Round() will round up to the nearest whole number.
I had been looking for a function to calculate age in Crystal Reports help and the Crystal Decisions website with no luck. I came up with the following formula that seems to work fairly well so I hope it helps others.
Truncate((DateDiff ("d", {Patient.Birthdate}, CurrentDate) / 365.25))
It is necessary to use the Truncate() function, as opposed to the Round() function, because the Truncate() will drop everything to the right of the decimal while Round() will round up to the nearest whole number.