I'm trying to calculate the difference between two dates in years using MySQL, but the DATEDIFF function seems to return the difference in days instead. For example, when I use the statement
SELECT DATEDIFF("2018-06-25", "2017-06-15") as years;
it returns "375" which is the difference in days rather than years.
I would like to know how I can get the difference between two dates in years using MySQL. Is there a specific function or method I should use to achieve this? I want the result to be the exact difference in years, considering any additional months or days.