日期:2014-05-17 浏览次数:20621 次
alter function fShowCountDate(@shipdate varchar(10))
returns varchar(7)
as
begin
return case when datepart(d,@shipdate)>=26 then convert(varchar(7),dateadd(m,1,@shipdate),120)
when datepart(d,@shipdate)<=25 then substring(@shipdate,1,7) else '' end
end