Unexpected behavior with "+(months):1"

I’m not sure if I’m missing something or not but I noticed something I find odd about the “+(months)” function. The reference states the following:

… +(months):
Adds/subtracts months to the date and returns the result. Use a negative number to subtract months.

Yet, when I tried to add one month from today’s date (August 31), I ended up with October 1:

Since September is only 30 days, compared to 31 in August, am I seeing 30 days being added and the resulting date being 10/1 as opposed to just the month being changed?

My original intent was to get to September 1 by adding a month and changing the date to 1. Because of the above, I did the reverse: I changed the current date to 1 and then added one month, which made it September 1. However, that doesn’t seem consistent with what happened above either…if it was 30 days added, as an average, I would have expected August 31, not September 1.

Am I missing something obvious?

Well you could use a conditional that goes something like this:

When Current Date/Time +(months): 1 extract month - Current Date/Time extract month is equal to or greater than 2, only add 27 days and then change the day to 1.

Something like that should work. Good luck,
Daniel

1 Like

Thanks. I’ll play around with that a bit.

Great, let me know how you get on.

This topic was automatically closed after 14 days. New replies are no longer allowed.