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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

calculating with dates 1

Status
Not open for further replies.

zoglchaim770

Programmer
Jun 19, 2003
15
I have a table that has field [date of birth]
I need to know how old is this person
I did something like this year (date ())-year ([date of birth] it is not exacted
I would like to know his age in years and months something like: 12 years and 6 months old
could you please help me
 
The following will calculate the age for you:

Code:
Int((DateDiff('d',[date of birth],Date())/365.25))

There are many threads in this forum that provide you with code to manipulate the age in years, months, and days. Look for the FAQ and Search for Age to find this code.

Good luck.



[COLOR=006633]Bob Scriver[/color]
MIState1.gif
[COLOR=white 006633]MSU Spartan[/color]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top