日期:2014-05-18 浏览次数:20578 次
--> 测试数据:[test]
if object_id('[test]') is not null drop table [test]
create table [test]([ID] int,[time] datetime)
insert [test]
select 1,'2012-7-3' union all
select 2,'2012-11-3' union all
select 2,'2012-11-11'
select ID,ltrim(MONTH([time]))+'月'+ltrim(DAY([time]))+'日' as [time]
from test
/*
ID time
1 7月3日
2 11月3日
2 11月11日
*/