日期:2014-05-18 浏览次数:20634 次
--> 测试数据:[tbl] if object_id('[tbl]') is not null drop table [tbl] create table [tbl]([date] datetime) insert [tbl] select '2012-03-18 14:50' union all select '2012-03-18 14:55' union all select '2012-03-19 14:56' select CONVERT(varchar(10),[date],120) as [date] from tbl group by CONVERT(varchar(10),[date],120) /* *date 2012-03-18 2012-03-19 */
------解决方案--------------------