摘要: declare @Year varchar(10),@Month varchar(10)set @Year=Convert(varchar,DATEPART(year,CONVERT(DATETIME,'2011-02-15')))set @Month=Convert(varchar,DATEPART(month,CONVERT(DATETIME,'2011-02-15')))select (DAY(dateadd(dd,-1,DATEADD(m,1,cast(@Year as varchar(4)) + '-' + cast(@Month as 阅读全文
posted @ 2011-02-28 16:30 张宏宇 阅读(185) 评论(0) 推荐(0) 编辑