Jason Goldsmith Posted August 30, 2003 Posted August 30, 2003 This is probably a basic question, but how do I convert a birthdate to a current age? The age should be calculated at the time the record is created, and then not change if the record is reopened. Thanks in advance.
CobaltSky Posted August 30, 2003 Posted August 30, 2003 Hello Jason, I suggest that you create a date field called 'DateOfBirth' to enter your birth days into, plus a second date field called 'CreationDate' and define it to auto enter the creation date of the record. Then create a calculation field of result type text with a formula along the lines of: Year(CreationDate) - Year(DateOfBirth) - Case(Month(CreationDate) < Month(DateOfBirth), 1, Month(CreationDate) = Month(DateOfBirth) and Day(CreationDate) < Day(DateOfBirth), 1, 0) & " years" which will give you the person's age in whole years as at the time of creation of the record.
Jason Goldsmith Posted August 31, 2003 Author Posted August 31, 2003 Nothing that grim. Actually, it's actuarial database. We use it to estimate the time of death, based on current health parameters, habits, lifestyle choices, etc.
Jason Goldsmith Posted August 31, 2003 Author Posted August 31, 2003 Let's see, glasses, a little grey around the temples ... my calculations say 3 years, 5 max. Just joking. But you are on the right track. It's an medical database.
Jason Goldsmith Posted August 31, 2003 Author Posted August 31, 2003 Thanks for the calc, it works perfectly.
Recommended Posts
This topic is 7825 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now