62,268
社区成员
发帖
与我相关
我的任务
分享
declare @t table(date datetime)
insert into @t(date) select '2011-12-20 11:22:22' union all select '2012-03-11 08:24:30'
select year(date) as [年份],month(date) as [月份],datepart(month,date) as [月份1],convert(nvarchar(7),date,23) as [年月]
from @t where convert(nvarchar(7),date,23) > '2011-12'