HOWTO: Calculate an Age Using Two Date Values

Valid from List & Label 6
To calculate an approximate age (a date difference in years) between two dates, usually something like the time between now and the date of birth, you can use the following formula:
Fstr$( Int( (DateToJulian(Today()) - DateToJulian(Date(BIRTHDAY)))/365.25 ), "####&" )


The type of the result is a string. If you need the age as numerical value, use:

Int( (DateToJulian(Today()) - DateToJulian(Date(BIRTHDAY)))/365.25 )


Please be aware that this formula might sometimes not present the correct age (ex. it might be wrong on certain Feb. 29th etc.).

IDKBTE000556 KBTE000556