Return to Snippet

Revision: 17265
at August 29, 2009 17:15 by nkm


Initial Code
SELECT FLOOR(DATEDIFF(CURRENT_DATE(), dob) / 365);

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

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

Initial Title
Calculate Age from Date Of Birth

Initial Tags
date

Initial Language
MySQL