I'm trying to get the difference in years with MySQL but it is showing an error when selecting the same.
SELECT(
DATE_FORMAT(NOW(), '%Y') - DATE_FORMAT('birthdate', '%Y') - (DATE_FORMAT(NOW(), '00-%m-%d') < DATE_FORMAT('birthdate', '00-%m-%d')) AS age
) FROM register where 'reg_id' = user254
What is the error?