data-driven subscription in SSRS

Discussion in 'SQL Server' started by Xarzu, Feb 12, 2019.

  1. Xarzu

    Xarzu New Member

    Joined:
    Dec 18, 2007
    Messages:
    21
    Likes Received:
    0
    Trophy Points:
    1
    I am setting a data-driven subscription in SSRS with what I hope to be a parameter for a date/time variable. The business requirement is that I pass a Parmenter to the report that needs to be set to yesterday's date from when the subscribed email alert is sent.

    This is a query I am using in a data-driven subscription in SSRS. How to I make the following SQL query return the previous date instead of the current system date:

    SELECT CONVERT (date, SYSDATETIME()) as rundate
     
  2. Xarzu

    Xarzu New Member

    Joined:
    Dec 18, 2007
    Messages:
    21
    Likes Received:
    0
    Trophy Points:
    1
    SELECT convert (date, DATEADD (DAY, -1 , SYSDATETIME())) as rundate
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice