0

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

satya
  • 313
  • 1
  • 7
  • 15

2 Answers2

0

Found the solution to my question, here it is

=Today.AddDays(1-Today.Day).AddMonths(2).AddDays(-1)

satya
  • 313
  • 1
  • 7
  • 15
0

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)

BishNaboB
  • 1,047
  • 1
  • 12
  • 25