select DATEDIFF(customer.dob, '2010-01-01') / 365.25 as age SELECT DATE_FORMAT(FROM_DAYS(DATEDIFF(customer.dob,'2010-01-01')), ‘%Y’)+0 AS age