摘要:
SQL 计算每个月的第一天,最后一天,本月的天数。sql server:--frist dayselect dateadd(dd,-datepart(dd,getdate())+1,getdate())--last dayselect dateadd(dd,-datepart(dd,getdate()) ,dateadd(mm,1,getdate()))--next month first dayselect dateadd(dd,-datepart(dd,getdate())+1,dateadd(mm,1,getdate()))--本月天数select datediff(dd,dateadd 阅读全文