Creating a Date HEading in SSRS

  • Hello,

     

    I want to create a date heading in my SSRS report that will figure out the Start Date and End date of last month to Last Year (Trailing 12 months).  I understand how to do this in SQL, but how do I format this for SSRS?

    DECLARE @StartDt datetime, @EndDt datetime

    SET @StartDt = (SELECT DATEADD(year, -1, DATEADD(MONTH, DATEDIFF(MONTH, -1, GETDATE())-1, 0)))
    SET @EndDt = (SELECT DATEADD(MONTH, DATEDIFF(MONTH, -1, GETDATE())-1, -1))

    PRINT @StartDt
    PRINT @EndDt

    Can someone help me understand what I need to do to get this to work in SSRS?

    Many thanks in advance!

  • Thanks for posting your issue and hopefully someone will answer soon.

    This is an automated bump to increase visibility of your question.

  • What do you mean exactly with but how do I format this for SSRS?

    SSRS has date functions http://venkateswarlu.net/MSBI/ssrs/SSRS_Common_Functions_Date_Time.aspx

     

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply