mysql year from date code example
Example 1: mysql get year from date
YEAR(my_date)
Example 2: mysql query date year
SELECT book_name,dt_of_pub,YEAR(dt_of_pub)
FROM book_mast
WHERE YEAR(dt_of_pub)>2003;
Example 3: calculate date and convert to yearsmysql
select date1, date2,timestampdiff(YEAR,date2,date1) from so7749639