I need to find out the date 1 year and 1 day ago from today in T-SQL. I have done the following but I keep getting errors.
select DATEADD(YEAR, - 1, CAST(CAST(GETDATE() AS DATE) AS DATETIME)),
DATEADD(DAY, - 1, CAST(CAST(GETDATE() AS DATE) AS DATETIME)))
Can someone please assist. Thanks.