摘要: declare @tm datetimeset @tm = CONVERT(datetime,'2013-3-12')declare @days intselect @days = case when MONTH(@tm) in(1,3,5,7,8,10,12) then 31 when MONTH(@tm) in(4,6,9,11) then 30 when MONTH(@tm) =2 and YEAR(@tm)%4 !=0 then 28 when MONTH(@tm) =2 and YEAR(@tm)%4 =0 then 29 else 0 endselect @days 阅读全文
posted @ 2014-01-16 18:57 singelMan 阅读(571) 评论(0) 推荐(0) 编辑