Subtracting one date from another gives you a number answer equal to the number of days between the two dates. Divide that number by 365.25 to get the number of years and a fraction.
Something like this:
NumYears = (date2 - date1)/365.25
To eliminate the fraction do this:
NumYears = Trunc((date2 - date1)/365.25)
I'm trying to do something similar to this question and can't seem to find the correct formula. I have an Age field that I want calculated from my Date Of Birth Field automatically. But I need it to be how old was that child on December 31, 2002. When I changed my date on my computer to say 12/31/02 and in the value section of my formula I put the following:
(Today() - DOB) / (365.25)
It puts something like 10.945666 and I just want it to say 10.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.