Hi all,
I'm very new to Power Automate but my company would like to make more use of it and asked me to try something.
I have a SharePoint list of our clients and when their contracts expire with us. I'm trying to put together a flow that will create a Planner Task 30 days before that client's contract expires.
This is what I have so far:
The weird part is my flow's history says it's running successfully, but no Planner Task gets created. I have a feeling I'm doing something wrong with the addDays functions, but if it's something else please let me know!
Hi @v-LilyW-msft ,
Your previous suggested steps actually did work! The issue was none of our clients on our list happened to be within 30 days of their contract expiring 😛 I created a test/dummy client, adjusted its expiry date to be 30 days from now and Planner Task was created!
Thanks again for all your help
Hi @clsmooth
The date in Sharepoint is automatically displayed in Flow with "yyyy-MM-dd" format.
Please make sure in your date column have a date equal to the current date plus 30 days.
I test on my side, if there is 9/29/2021 in my date column, a new task will be created.(My current date is 8/30/2021 )
This is my test list
Flow in details:
After Flow runs, a new task will be created.
Best Regards.
Hi @v-LilyW-msft ,
Thanks for your update, I gave your tips a try.
I first updated the function with addDays(utcNow(),30,'yyyy-MM-dd'). Getting successful runs still, but still no Planner Task.
I also added your 2 Compose steps and when I go back to check them, I'm getting slightly different results then you are:I also noticed the date format in our SharePoint list appears as such ('Date and Time' attribute column in SharePoint).
I'm wondering if the MM portion of how the date format is causing a problem? Single digit months don't have a 0 in front of them.
I tried editing the way the date is formatted to try and matching what's in SharePoint.
I've attempted:
addDays(utcNow(),30,'MM-dd-yyyy')
addDays(utcNow(),30,'MM-DD-YYYY')
addDays(utcNow(),30,'mm-dd-yyyy')
addDays(utcNow(),30,'MM/DD/YYYY')
addDays(utcNow(),30,'mm/dd/yyyy')
Still getting successful runs, still no Planner Task. What format should I use to match what's in the SharePoint list? Should I change the column's attribute in the list?
Thanks again!
Hi @clsmooth
Please change the formula to addDays(utcNow(),30,'yyyy-MM-dd').
Because the date in Sharepoint is displayed in Flow with ‘yyyy-MM-dd’ format, so need to set the date format to the same and then compare.Otherwise your Condition result will always be false.
You can use Compose action to check their output.
Hope the content above may help you.
Best Regards
If my solution helps, then please consider Accept it as the solution to help the other members find it more quickly.
Michael E. Gernaey
497
Super User 2025 Season 2
David_MA
436
Super User 2025 Season 2
Riyaz_riz11
244
Super User 2025 Season 2