Posted By

nkm on 08/29/09


Tagged

date calculate birth dob


Versions (?)

Who likes this?

5 people have marked this snippet as a favorite

Pixelpower
dantreacy
jackkeller
ljayz
kubaitis


Calculate Age from Date Of Birth


 / Published in: MySQL
 

URL: http://ma.tt/2003/12/calculate-age-in-mysql/#comment-462995

It's not 100% accurate, but works fine for people under 1.480.

  1. SELECT FLOOR(DATEDIFF(CURRENT_DATE(), dob) / 365);

Report this snippet  

You need to login to post a comment.