有人可以解释一下为什么到目前为止的日期时间会提前2天返回吗?
我刚碰到这个,需要明白。
执行此操作:
SELECT
CAST(FLOOR(CAST(GETDATE() AS float)) AS datetime) AS currDate,
CAST(CAST(FLOOR(CAST(GETDATE() AS float)) AS datetime) AS DATE) AS lessDays
在我的Sql Server 2008 R2中返回我:
----------------------------------------------
| currDate | lessDays |
----------------------------------------------
| 2011-08-28 00:00:00.0 | 2011-08-26 |
----------------------------------------------
提前致谢