Calculate the Age of a person by now - BOD

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

1 Like

@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


grafik

Find starter help:
CheckAge.xaml (9.0 KB)

1 Like

excel date format is mm-dd-yyyy
local sys format is dd-mm-yy