previous year start and end date in swl
--To get the first day of the previous year in SQL Server, use the following code:
SELECT DATEADD(yy, DATEDIFF(yy, 0, GETDATE()) - 1, 0)
--To get the last day of the previous year:
SELECT DATEADD(dd, -1, DATEADD(yy, DATEDIFF(yy, 0, GETDATE()), 0))