Result: 2019
SELECT YEAR ('2020/03/31 10:05');
Result: 2020
SELECT YEAR ('2021/04/01 10:05:18.621');
Result: 2021
Previous article: Ham MONTH in SQL Server
Next article: CAST function in SQL Server