SELECT DATEADD(DAY,-1,'20121212') SELECT DATEADD(DAY,-1,GETDATE()) SELECT DATEADD(MONTH,-1,'20121212') SELECT DATEADD(MONTH,-1,GETDATE()) SELECT DATEADD(YEAR,-1,'20121212') SELECT DATEADD(YEAR,-1,GETDATE())
Select * From Table Where (CreateDate<=DATEADD(YEAR,-1,GETDATE())) Select * From Table Where (CreateDate<=DATEADD(MONTH,-1,GETDATE())) Select * From Table Where (CreateDate<=DATEADD(DAY,-1,GETDATE()))
学习交流群:364976091