Normal Topic Calculating Current age from birthdate (Read 625 times)
JFisher
Junior Member
**
Offline


No personal text

Posts: 51
Location: Roswell, NM
Joined: Jan 7th, 2004
Calculating Current age from birthdate
Apr 27th, 2004 at 7:37pm
Print Post Print Post  
I'm having another "Senior moment."  Sad
Using the birthdate and the current date, I am unable to calculate the current age.  ...and don't seem able to find the answer in the manuals.  I seem to remember using Julian dates a LONG time ago.
Any hints will be most welcome.  I will send nice New Mexico weather to the one who comes up with a simple solution.  (I believe it is simple) Undecided
Thanks...
Jack
  
Back to top
 
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Calculating Current age from birthdate
Reply #1 - Apr 27th, 2004 at 7:44pm
Print Post Print Post  
Hi Jack,

Both Bharat_Naik and BOBSCOTT have posted examples of this on the Programming Examples Board. Check them out and see if they help you.
http://www.lantica.com/Forum2/cgi-bin/yabb/YaBB.pl?board=program;action=display;...
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: Calculating Current age from birthdate
Reply #2 - Apr 27th, 2004 at 7:55pm
Print Post Print Post  
Basic calculation for Age in years, no rounding.:

Age=@Int((@Date-DOB)/365.25)

Possible errors because no adjustments for leap years.
======================
Subsequent edit:  Oops, did not see that you already had solutions posted.  Previous posted formula from Bob Scott on 2/23 does take care of leap year issue.
  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
JFisher
Junior Member
**
Offline


No personal text

Posts: 51
Location: Roswell, NM
Joined: Jan 7th, 2004
Re: Calculating Current age from birthdate
Reply #3 - Apr 27th, 2004 at 8:18pm
Print Post Print Post  
Erika, Bob and Bharat...
Thanks for the response.  Much quicker than expected!
Now good weather is coming from New Mexico to you for tomorrow. Wink
Gratefully,
Jack
  
Back to top
 
IP Logged