dates birth
RH

Forum home » Delegate support and help forum » Microsoft Access Training and help » Dates of Birth

Dates of Birth

resolvedResolved · 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.


 

Access tip:

Changing MS Programs Text Size

A 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.

Then, to increase the font size, press CTRL+SHIFT+>.

To decrease the font size, press CTRL+SHIFT+<.

View all Access hints and tips


Server loaded in 0.06 secs.