I need to calculate the age of a \"customer\" from their date of birth.
I have tried to use the following:
DATEDIFF(year, customer.dob, \"2010
DATE_FORMAT(FROM_DAYS(DATEDIFF(CURDATE(),'1869-10-02')), '%Y')+0 AS age;
Above MySQL query has been tested and verified. It will give you exact age in years. I have taken this idea from Marcos answer and switched DATEDIFF() parameters.