>I have run into an interesting issue. We have been using the following line for some time to give the age of a person.
>
>
>ALLTRIM(STR(INT((DATE()-This.Value)/365.25)))
>
>
>However, on the birthday, on many years it's off by one day (wrong value on the birthday, but correct the next day).
>
>Is there an easy way to always get the age right with a single line of code? If not, what block of code would it take to accomplish this?
Maybe a little unorthodox. But it makes sense to me :)
nAge= YEAR(ldDate) - YEAR(ldDob) - IIF(GOMONTH(ldDob, (YEAR(ldDate) - YEAR(ldDob)) * 12) > ldDate, 1, 0)