• 1
Votes
name
name Punditsdkoslkdosdkoskdo

How to calculate age based on date of birth in mysql?

My date of birth format is : 2017-Feb-15

when I am using the following query, it's not working

select (year(current_date)-year(dob)) as age from user 

or how to current 2017-Feb-15 into 2017-02-15 format