98.7% Of all customers recommend us, we're so confident about our results we publish all reviews and stats
View Live Stats View ReviewsForum home » Delegate support and help forum » Microsoft Access Training and help » Dates of Birth
Dates of Birth
Resolved · Medium Priority · Version 7
Sheila has attended:
Access Intermediate course
Dates of Birth
We have got details of people's dates of birth but would like Access to tell us their ages automatically.
RE: Dates of Birth
Hi Sheila - apologies for the delay. I have a couple of suggestions for a calculated field in a query. Should have them online by end of today.
Kind regards,
Andrew
RE: Dates of Birth
Hi Shirley
Make a query based on the table containing the DOB field. Create a custom field in the query by adding the following to the field row:
Age: DateDiff("yyyy",[DOB],Now())+Int(Format(Now(),"mmdd")<Format([DOB],"mmdd"))
This uses the datediff function to work out the difference between your DOB field and today's date. You should find your query now has a new column called Age with the calculated value.
There are several ways of approaching this but this might just do the trick. Give it a try and see if the results work with your data.
Kind regards,
Andrew
Fri 11 Sep 2009: Automatically marked as resolved.
Training information:
See also:
Welcome. Please choose your application (eg. Excel) and then post your question. Our Microsoft Qualified trainers will then respond within 24 hours (working days). Frequently Asked Questions
Any suggestions, questions or comments? Please post in the Improve the forum thread. |
Access tip:Changing MS Programs Text SizeA handy way to increase or decrease the size of text in Microsoft Word, Microsoft PowerPoint, Microsoft FrontPage, or Microsoft Publisher, first, select the text you want to resize. |