How do I get the last day on the month using SQL Reporting Services

后端 未结 7 971
花落未央
花落未央 2020-12-13 04:44

In SQL Server Reporting Services, how would I calculate the last day of the current month?

7条回答
  •  旧巷少年郎
    2020-12-13 05:32

    From the blog of a Microsoft SQL Team member:

    -- returns the last day of the current month.
    select dbo.Date(year(getdate()), month(getdate())+1,0)
    

    http://weblogs.sqlteam.com/jeffs/archive/2007/01/02/56079.aspx

    Hope this helps! --Dubs

提交回复
热议问题