【发布时间】:2015-05-04 14:37:43
【问题描述】:
我正在使用CAST 语法将DateTime 字段转换为时间。
select CAST([time] as time) as [CSTTime]
日期时间
2015-03-19 00:00:00.000
当前输出:时间
03:05:36.0000000
我只需要 HH:MM:SS 而不需要毫秒或 0000 的
如何过滤或将其转换为精确的HH:MM:SS 格式。
【问题讨论】:
-
你到底是怎么把
03:05:36.0000000从2015-03-19 00:00:00.000转换成TIME格式的?
标签: sql sql-server sql-server-2008