Hello lovely people! It's a long time since I've been on here but I need your help.
I have this code to calculate and display a person's age when they passed away but it's giving me the wrong age, it adds one year to their age!
I read somewhere that it could have something to with Leap Years, but my old brain can't work it out.
Your help would be appreciated.
Thank you.
The person was born on: 4th Oct. 1923
and passed away on: 25th May 2021
Her age should have been 97 years and 7 months
NOT 98 years and 7 months
=DateDiff("yyyy",Nz([Death_Ann],Date()),Date())+(Date()<DateSerial(Year(Date()),Month(Nz([Death_Ann],Date())),Day(Nz([Death_Ann],Date())))) & " Years, " & (DateDiff("m",Nz([Death_Ann],Date()),Date())) Mod 12 & " Months Ago"
Tidak ada komentar:
Posting Komentar