Jump to content


getting exact age of a person given their DOB

  • Please log in to reply
1 reply to this topic

#1 robcrozier

  • Members
  • PipPipPip
  • Advanced Member
  • 175 posts

Posted 21 April 2006 - 11:01 AM

can anyone help me?

im trying to get the exact age of a person from my database using their date of birth. Obviously you subtract their date of birth from the current date and that gets you somewhere close but i need to fidn out if their birthday has passed etc in order to find out exactly how old they are


#2 fenway

  • Staff Alumni
  • MySQL Si-Fu / PHP Resident Alien
  • 16,199 posts
  • LocationToronto, ON

Posted 21 April 2006 - 03:28 PM

I'm not sure I understand -- the date math you describe will give you their precise age. If you need to know if their birthday has passed, simply look at the date and forget about the year.
Seriously... if people don't start reading this before posting, I'm going to consider not answering at all.

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users