摘要:
---sql server declare @date datetimeset @date='2012-02-03'--getdate()--本月第一天SELECT DATEADD(mm, DATEDIFF(mm,0,@date), 0)--本月最后一天SELECT dateadd(ms,-3,DATEADD(mm, DATEDIFF(m,0,@date)+1, 0))---有個月多少天函數if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[GetAMonthHowNumber] 阅读全文