注意:2月份有闰有平!select '本月天数'=day(dateadd(dd,-1,cast(convert(varchar(6),dateadd(mm,1,getdate()),112)+'01' as datetime)))