Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How old?

Status
Not open for further replies.

teqtaq

Technical User
Nov 18, 2007
197
US
I have a Birt Date of the people. I need to get their age.
What is the best formula in query for Access 2003?

Thanks
 
I got one DateDiff("yyyy",Date(),[BIRTH DATE])
but is this the best way?
 
If they both born in a same year - I am ok then.
I need to have people divided into groups 20-30, 40-50 etc.
So it should work than? Thanks for the links, I will browse.
 
DateDiff() returns the number of thresholds that have occurred between two dates. This is usually not a good method for determining age. For instance:
DateDiff("yyyy",#12/31/2006#,#1/1/2007#)=1
DateDiff("yyyy",#1/1/2006#,#12/31/2007#)=1

The first dates represent a single day while second set of dates is 730 days.


Duane MS Access MVP
Now help me support United Cerebral Palsy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top