now() - 2 years in sql mysql code example Example: calculate date and convert to yearsmysql select date1, date2,timestampdiff(YEAR,date2,date1) from so7749639