cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Super User
Super User

Add months doesn't work!

Adding 1 month to some dates seems to work. Often however it doesn't work. this needs to be fixed.

 

https://veenstra.me.uk/2018/04/30/microsoft-flow-next-month-is-okay-but-dont-go-any-further/

9 REPLIES 9
Community Support
Community Support

Re: Add months doesn't work!

Hi @Pieter_Veenstra,

 

Thanks for your feedback, I have made a test and the issue is confirmed on my side. It seems that adding 1 month to some dates is based on 31 days (1 Month=31 Days), adding multiple months to some dates is based on 30 days (1 Month=30Days).

 

I would post this issue to my product team, if this issue is solved, I would reply here.

 

Best regards,

Kris

 

 

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
AKN Helper I
Helper I

Re: Add months doesn't work!

addToTime(utcNow(),6,'Month')
this also does not work, today is 01-05-2018 and it returns 29-10-2018
Anonymous
Not applicable

Re: Add months doesn't work!

I'd like to echo @Pieter_Veenstra's diagnosis of this problem, I'm experiencing the same issue. I would think adding any number of months to a date would leave the day attribute of the date as-is, but adjust the month and, if necessary, the year. 

beastmp
New Member

Re: Add months doesn't work!

This has been driving me crazy as well, and I believe it should continue to be a bug as the desired normal functionality is not working as expected.

 

That being said, I do believe I have found the reason behind the inconsistency and possible methods to fix this. This method is expected to take the input of interval and add that number of months to the current date, however through initial testing, the actual functionality takes the interval input and adds the number of days in the month corresponding to that number and adds it to the date. So if the interval is 1 it adds 31 because 1=January, 2 would be 28 because 2=February, 3 would be 31 because 3=March and so on and so on.

 

Here is the output data from tests run with the starting date of 05/10/2018:

IntervalDate OutputDifference in Days
005/10/20180
106/10/201831
207/08/201828
308/08/201831
409/07/201830
510/08/201831
611/07/201830
712/08/201831
801/08/201931
902/07/201930
1003/10/201931
1104/09/201930
1205/10/201931
AKN Helper I
Helper I

Re: Add months doesn't work!

That is just wierd, what logic will it then use if you chose seconds, minutes, hour or weeks 😉

AKN Helper I
Helper I

Re: Add months doesn't work!

any news on this bug?

Super User
Super User

Re: Add months doesn't work!

JPC Advocate I
Advocate I

Re: Add months doesn't work!

Hello, 

 

Just go the same issue to go back one month. A flow runned today and substracted 31 days. Instead of getting February, I got January. Annoying...

Is there something done for that bug? 

2019-03-01_09h36_52.png

mltytskr
New Member

Re: Add months doesn't work!

@v-xida-msft Are there any updates on this bug? We are being encouraged to use Flow to replace Dynamics 365 processes, but this is a critical function for our system. When I add 1 month to September 1, I'm getting October 2.

Annotation 2019-09-10 081904.png

Helpful resources

Announcements
firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Automate Community!

firstImage

Now Live: Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Kudoed Authors
Users online (9,497)