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

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/

10 REPLIES 10
v-xida-msft
Community Support
Community Support

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.

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

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

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

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

any news on this bug?

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

@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
MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Users online (50,174)