power-automatemicrosoft-planner

Office Forms + Power Automate + Teams + Planner Task


I've got a Forms form that thru Power Automate I add a task to a Planner plan in Teams.

The form has a [due date] field on it, and I set the due date of the Planner task equal to the value of that [due date].

Everything is working except, on the form in the [due date] field I select 2/28/22. But, when the Planner task is created it shows 2/27/22 as the due date.

I tested my PowerAutomate flow and I see '2022-02-28T00:00:00Z' as the date being added to my Planner task. Why is that then showing as a due date of 2/27/22 in Planner? How do I overcome this? I know I can just add +1 day to the [due date], but I'd rather not be so kludge.


Solution

  • This article showed me the cause and offered a couple of solutions. https://powerusers.microsoft.com/t5/Building-Flows/Wrong-date-for-Planner-Task/td-p/999746

    Here's the code that worked for me in the due date field on my Planner task in Power Automate: addToTime(outputs('Get_response_details')?['body/GUIDHERE'],12,'Hour','yyyy-MM-ddTHH:mm:ssZ')