Skip to content
Advertisement

MYSQL Query Age Calculation

This is my MySQL Query to return the age from the date of birth

The query is executed. But it returns the age difference is in a negative value.

Output

Advertisement

Answer

The problem with 2-digit year fixed – all years are treated as 19xx.

https://dbfiddle.uk/?rdbms=mysql_8.0&fiddle=f356258c99b20d13b0c4e2349b801f18

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement