Check out example codes for "calculate date and convert to yearsmysql". It will help you in understanding the concepts better.

Code Example 1

select date1, date2,timestampdiff(YEAR,date2,date1) from so7749639

Learn ReactJs, React Native from akashmittal.com