SQL Server Datetime Bandingkan

Pressupondo uma tabela utilizador u.

year(u.DataInicio) --> Retorna o ano
month() --> Retorna o mês
day() --> dia

Exemplo:
u.Ativo = 1 AND year(u.DataInicio)<= 2018
Tough Thrush