What would a good way be of calculating the Age of a person from a Date of Birth?
Printable View
What would a good way be of calculating the Age of a person from a Date of Birth?
here, try this link:
http://www.phpbuilder.com/tips/item.php?id=653
its simpler than you think ;)
Thanks for your response.
I've got an easier way of doing it through MYSQL :)
Code:DATE_FORMAT(NOW(), '%Y') - DATE_FORMAT(dob, '%Y') - (DATE_FORMAT(NOW(), '00-%m-%d') < DATE_FORMAT(dob, '00-%m-%d')) AS age