我想使用SQL Server 2005和2008默认输出使用SQL查询从DateTime列获取时间:
AttDate
==
2011-02-09 13:09:00
2011-02-09 14:10:00
我想要这个输出:
AttDate Time
==
2011-02-09 13:09:00 13:09
2011-02-09 14:10:00 14:10
慕哥6287543
浏览 919回答 3
3回答
慕容森
SQL Server 2008:select cast(AttDate as time) [time]from yourtable早期版本:select convert(char(5), AttDate, 108) [time]from yourtable