only subtracting years will not be accurate. You will have to get the number of total days and then divide to get the number of years.
now.Subtract(date.Parse(“2/12/2001”)).Days/365 ~approx
only subtracting years will not be accurate. You will have to get the number of total days and then divide to get the number of years.
now.Subtract(date.Parse(“2/12/2001”)).Days/365 ~approx
@nameless thanks for the hint
Yes is a quick approach and not accurate when now is before persons birthday.
It was choosen for introduction into coding
.Days/365 is ignoring Leap years ( no tragic catastrophe)
BirthDay in Future
Birthday in the past
Find starter help:
CheckAge.xaml (9.0 KB)
excel date format is mm-dd-yyyy
local sys format is dd-mm-yy