You can use UNIX_TIMESTAMP, to get the range of differences between 2 dates
SET @fechaUno = '2018-01-01 00:00:00';
SET @fechaDos = '2009-01-01 00:00:00';
SELECT UNIX_TIMESTAMP(@fechaUno) - UNIX_TIMESTAMP(@fechaDos);
The UNIX_TIMESTAMP function, takes as the default starting value of
'1970-01-01 00:00:00', in GMT time format, which grants a
Time measurement based on atomic character clocks, consider that if you do not assign a default value to this function, it will take the current date and time.
GMT is used, or better known as greenwich mean time, which is a measure of international standard time.
For this calculation to work for you, you need the variables to contain the format YYYY-MM-DD HH: MM: SS
In the end you can help with this google tool, to transform the amount obtained from seconds to days, months, years or whatever you require