How to Get the number of days, months, and years between an employee's date of birth and today's date – Mysql
I tried this but how to calculate for leap years. SELECT FLOOR(DATEDIFF(NOW(), date_of_birth) / 365.25) as years, FLOOR(MOD(DATEDIFF(NOW(), date_of_birth), 365.25) / 30.4375) as months, MOD(DATEDIFF(NOW(), date_of_birth), 30.4375) as days FROM employees; Can anyone please help