Select a date without time (SQL Server (+)
This question already has an answer here:
On SQL Server 2008 and higher, you should convert to date:
SELECT CONVERT(date, (DATEADD(year, -1, GETDATE())))
On older versions, you can do the following:
SELECT DATEADD(dd, 0, DATEDIFF(dd, 0, DATEADD(year, -1, GETDATE())))
链接地址: http://www.djcxy.com/p/94382.html