tsql get beginning of year

Solutions on MaxInterview for tsql get beginning of year by the best coders in the world

showing results for - "tsql get beginning of year"
Andrea
22 Apr 2019
1SELECT
2   DATEADD(yy, DATEDIFF(yy, 0, GETDATE()), 0) AS StartOfYear,
3   DATEADD(yy, DATEDIFF(yy, 0, GETDATE()) + 1, -1) AS EndOfYear