select getdate() ---当前时间:2015-12-18 10:20:24.097 -------------------建立测试表 Create Table #Test ( ID INT , DATE datetime ) insert into #Test select 1,SUBSTRING(convert(varchar,dateadd(dd,-day(getdate()),getdate()),120),1,10)
输出结果: select * from #Test
2015-11-30 00:00:00.000