6
I have the appointment below, but she ignores the month and day of birth
SELECT
FLOOR(DATEDIFF(NOW(), c.nascimento) / 365) AS idade
FROM
clientes c
In the result, most come right, but sometimes have difference of one year. How to make the consultation, but taking into account the month and day of birth?
You need to take into account also the years that are leap.
– Giovani
How could I calculate using leap year?
– Milky-way