Get your date of birth
Get the current date
Subtract the birth year from the current year
If your birthday has not happened yet this year, subtract 1 from the result
The final result is your age in years
Get your date of birth
Get the current date
Subtract the birth year from the current year
If your birthday has not happened yet this year, subtract 1 from the result
The final result is your age in years