现在我只想更新那个日期的时间. E.G到2013-12-14 04:00:00.000
有没有任何查询只能从datetime字段更新时间?
UPDATE MyTable SET MyDate = DATEADD(HOUR,4,CAST(CAST(MyDate AS DATE) AS DATETIME))
或这个
UPDATE MyTable SET MyDate = DATEADD(HOUR,CAST(FLOOR(CAST(MyDate AS FLOAT)) AS DATETIME))