sql convert datetime to year
snippet in sql

sql convert datetime to year

user7826

select YEAR(getdate())
/* 2020 */

sql convert datetime to year

user8561

select YEAR(getdate())
/* 2020 */