Search code examples
datereporting-servicesexpression

SSRS Expression 3 years prior to today's date


Does anyone know of an expression for reporting services to return the first day of 3 years ago?

Example: Today's Date = 3/20/2018 Return date: 1/1/2015

I would like to always return 1/1/2015 regardless of what date it is during the current year.

Thank you


Solution

  • Not sure if this is the best way to go about it.. but a hack way would be to do this in SSRS is :

    =CDate("1/1/" & Str(Year(Today())-3))
    

    This is assuming you always want 3 years ago of course.. adjust to suit