Not a sollution to why this is happening but did you try to use [%EndOfCurrentMonthUTC%]?
So addMonthsUTC([%EndOfCurrentMonthUTC%],1)
Regards,
Ronald
Hello SL,
This is an interesting question. I don’t know if the result 2/28/2020 is right, but it is defendable.
But first, the expression is taking leap years into account. I tried adding one month to date 1/30/2020 and it returned 2/29/2020. So it knows about leap years.
Back to the original question. What does adding one month exactly mean? It is hard to define correctly. You started with 30/1/2020 (one day before the last day of January) and ended up with 28/2/2020 (one day before the last day of February). If you put it that way, the result sounds right to me. Adding one month, does that mean always adding 30 days, or does it mean adding 31 days, or something else? In your case it added 29 days, and that is the lenght of February 2020.
This subject can be debated for a long time. If you want more, I can for example recommend https://codeblog.jonskeet.uk/2010/12/01/the-joys-of-date-time-arithmetic/
Regards,
Paul
Hi – in response to Ron’s, unfortunately, I cannot use the keyword endofcurrentmonth, but good thought and thank you!