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 Team
Community Support Team

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
Level: Powered On

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
Chris5
Level: Powered On

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
Level: Power Up

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
Level: Powered On

Re: Add months doesn't work!

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

AKN
Level: Powered On

Re: Add months doesn't work!

any news on this bug?

Super User
Super User

Re: Add months doesn't work!

JPC
Level: Powered On

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
Level: Power Up

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

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020.

thirdimage

Flow Community User Group Member Badge

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

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 378 members 4,744 guests
Please welcome our newest community members: