Hi,
I have a flow that runs successfully but does not produce result as expected. I am using a SharePOint task list which has DueDate column, the flow triggers when a task is marked as completed and then creates a task as recurring with a new due date, the flow is created to provision recurring tasks.
I have a frequency column with values: Annually, Semi Annually, Monthly and Quarterly so based on the value of frequency column, it should change the due date value, for example monthly should add one month to orginal due date, semi annually adds 6, quarterly adds, 3 and annually adds 12 and.
Formulas for compose:
Solved! Go to Solution.
Hi @dmistry ,
I did a test on my side and it is not possible to determine whether the Month representative is 30 days or 31 days.
It seems that if you use Month to accumulate dates, you can't get the expected date.
If you want the "dd" of the date after the accumulation is the same as before, you could consider using the following Expression:
addDays(startOfMonth(addToTime(triggerBody()['date'],3,'Month')),sub(dayOfMonth(triggerBody()['date']),1),'yyyy-MM-dd')
Please take a try.
Best Regards,
Hi @dmistry ,
I did a test on my side and it is not possible to determine whether the Month representative is 30 days or 31 days.
It seems that if you use Month to accumulate dates, you can't get the expected date.
If you want the "dd" of the date after the accumulation is the same as before, you could consider using the following Expression:
addDays(startOfMonth(addToTime(triggerBody()['date'],3,'Month')),sub(dayOfMonth(triggerBody()['date']),1),'yyyy-MM-dd')
Please take a try.
Best Regards,
@v-bacao-msft is it possible to keep the month number also same like you showed for Day. I have a change in requirement, now only year value needs to be changed. So for startofmonth, I am passing in 12 instead of 3 as you showed which adds a year to the current date and day value remains same.
However, in an off case, for date: 5/1/2019 (first of every month), flow gives me 4/1/2020, in theory, i want this to be 5/1/2020. So the month and day now should not changed but only year value, can you please help me with the revised formula?
Please help @v-bacao-msft , much appreciated in advance.
Check out new user group experience and if you are a leader please create your group
See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.
User | Count |
---|---|
47 | |
44 | |
43 | |
42 | |
36 |
User | Count |
---|---|
83 | |
78 | |
69 | |
51 | |
47 |