日期:2014-05-18 浏览次数:20479 次
DECLARE @D DATETIME SET @D=GETDATE() SELECT DATEADD(DAY,-1,(DATEADD(MONTH,1,CAST(YEAR(@D) AS NVARCHAR(10))+'-'+CAST(MONTH(@D) AS NVARCHAR(2))+'-01'))) 2012-05-31 00:00:00.000
------解决方案--------------------
select dateadd(dd,7,你输入的日期)