This is my MySQL Query to return the age from the date of birth
SELECT
PensionerDOB,
YEAR( CURDATE() ) AS Year,
DATE_FORMAT( STR_TO_DATE( PensionerDOB, '%d-%M-%Y' ), '%Y') AS age,
YEAR( CURDATE() ) - DATE_FORMAT( STR_TO_DATE(`PensionerDOB`, '%d-%M-%Y' ), '%Y' ) AS differenage
FROM
`pensionerbasicdata`
The query is executed. But it returns the age difference is in a negative value.