By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,961 Members | 1,333 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,961 IT Pros & Developers. It's quick & easy.

Calculating Ages on a report

P: 2
I am new to access. I have created a report that has the DOB on it, however my real goal is to have the age calculated as of the day the report is generated. I have =now() in the report footer and was hoping I could use that to help the calculation. Please advise as to the most direct approach of creating this.
Aug 28 '08 #1
Share this Question
Share on Google+
3 Replies


Expert Mod 2.5K+
P: 2,545
Hi, and Welcome to Bytes!

Have a look at this thread for several ideas on how to provide the age of a person given the date of birth and a specific reference date.

-Stewart
Aug 28 '08 #2

P: 2
Thanks for the advice. I will let you know how it works.
Aug 28 '08 #3

P: 69
In my experience, most newcomers to Access have not clearly understood the implications of the way that Access handles dates, i.e. a specific date is represented as an integer that start counting from a known start date. So, if you have two dates and subtract the one from the other, you know the number of days between the two dates and from there calculating the number of years is simply a matter of dividing by 365 and using the integer part of this sum.

Armed with this simple principle, someone needing this or related answerscan design code to achieve them and can make that as complex as needed.

A similar process can be applied to the decimal portion of a Date/Time value. In this case the number to remember is 86400, the number of seconds in a da. Multiply this by the decimal part of a date and you are on your way to calculating the number of minutes, hours in a time period.
Aug 29 '08 #4

Post your reply

Sign in to post your reply or Sign up for a free account.