I'm trying to solve a problem, and this involves getting the number of years between 2 dates, would anyone know why this returns 21 when it should be 22?
Thanks
SELECT DATE_FORMAT(FROM_DAYS(DATEDIFF('2022-09-28','2000-09-28')), '%Y') + 0 AS years;
I'm trying to solve a problem, and this involves getting the number of years between 2 dates, would anyone know why this returns 21 when it should be 22?
Thanks
SELECT DATE_FORMAT(FROM_DAYS(DATEDIFF('2022-09-28','2000-09-28')), '%Y') + 0 AS years;