日期:2014-05-17 浏览次数:20526 次
declare @rq1 smalldatetime,@rq2 smalldatetime
set @rq1='2012-3-14'
set @rq2='2013-3-1'
select case when (case when datepart(d,@rq1)>=15 then datediff(m,@rq1,@rq2) else datediff(m,@rq1,@rq2)-1 end)>=12 then '满一年'
else '不满一年' end