Search code examples
ssrs-2008-r2

SSRS Date Parameters


Please could someone provide some insight to the situation below?

I am looking for a Date expression (LAST Day of the Following Month) which I would like to use it on my "End Date Parameter".

I have expression below, but for some reason it is only showing me only up to 30th day (e.g January instead of 31/01/2017, it is showing as 30/01/2017)

=dateadd("m",2,dateserial(year(Today),month(Today),0))

Regards

Satya


Solution

  • Alternative:

    =dateadd(dateinterval.day, -1, dateserial(year(today()), month(today())+2, 1))
    

    Work out the start of the month for 2 month's time, then take a day away. You can also use:

    =dateadd(dateinterval.second, -1, dateserial(year(today()), month(today())+2, 1))
    

    If you want the end of that day (23:59:59)