Here is my table schema in Microsoft SQL Server. If I would like to retrieve an integer that represents the year of the STA_DATE (with datetime data type).
We can use YEAR function, Microsoft SQL Server build-in function, to fulfill this requirement.
SELECT sta_date, year(sta_date) YEAR FROM dbm034fa
Check the result :