Get first day of the current year in SQL

Recently there was a requirement for me to get the first day of the current year. After banging my head here and there found following solution online and it works like charm. <3

DECLARE @START_DATE_YEAR DATETIME
SELECT @START_DATE_YEAR = DATEADD(yy, DATEDIFF(yy,0,getdate()), 0)
Did you enjoy this article?
Signup today and receive free updates straight in your inbox. We will never share or sell your email address.

Leave a Reply