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

Adding Days to a date pulled from a forms response

My current pickle - I am a teacher and have quite a few graders working for me to grade in quite a few classes. We use planner in teams so they can let each other know who is grading/responsible for which assignment. The classes we teach occur regularly and always have due dates based on the start date of the course. 

 

I have set up a Form with a date question "Start Date of Course" and a choice question to pick the class that is running.

 

My goal is to use the form (for now, this will be in salesforce eventually) anytime a new class starts to create items in Planner; specifically it is set to create a bucket (the class) and all associated assignments (tasks) w/ due dates as the graders are to grade on a FIFO system based on due date.

 

I keep hitting an error when getting to the "Create a Task" step because of the due date.

 

In the due date field, I can not figure out how to use the "Start date of course" (a response from the form in date format

Machine_0-1611611723422.png) with the "addDays" function.

When setting up the FORM, I did make sure to use the "Date" feature on the question. If I use the "Start Date of Course" content directly in the "Due Date Time" under "Create a Task" it works fine; but I can not figure out how to change that date. 

Machine_1-1611611907375.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

@Machine 

On the addDays function you can also specify the format of the resulting value, addDays function accepts three parameters 1 - The timestamp to which the days have to be added,2- number of days to add,3- format in which the resulting value has to be in. 

 

Let us consider that I am using the addDays function and I want my result to be in format MM-dd-yyyy then I will specify this as a third parameter of the function.

 

Also the planner expects the date values to be in full time format which is yyyy-MM-ddThh:mm:ss.ssZ

 

To ease the process you can use the default action from power automate

Gopala_Krishna_0-1611682321460.png

 

This will directly give you the desired result, for more information related to the planner action please check - Planner - Connectors | Microsoft Docs

 

For information related to timezone format and how to setup - ISO 8601 - Wikipedia

 

If the information shared helps you, please consider giving a thumbs up 👍 and mark solution as resolved.

View solution in original post

2 REPLIES 2
Super User
Super User

@Machine 

On the addDays function you can also specify the format of the resulting value, addDays function accepts three parameters 1 - The timestamp to which the days have to be added,2- number of days to add,3- format in which the resulting value has to be in. 

 

Let us consider that I am using the addDays function and I want my result to be in format MM-dd-yyyy then I will specify this as a third parameter of the function.

 

Also the planner expects the date values to be in full time format which is yyyy-MM-ddThh:mm:ss.ssZ

 

To ease the process you can use the default action from power automate

Gopala_Krishna_0-1611682321460.png

 

This will directly give you the desired result, for more information related to the planner action please check - Planner - Connectors | Microsoft Docs

 

For information related to timezone format and how to setup - ISO 8601 - Wikipedia

 

If the information shared helps you, please consider giving a thumbs up 👍 and mark solution as resolved.

View solution in original post

Regular Visitor

@Gopala_Krishna I ended up using the default action as you suggested. With the number of assignments and due dates, I was hoping keep it within the create a task action as a way to keep the automation a little cleaner. Just have to keep good/better track of which date I'm calling with the default action I suppose.

Thank you for the reply! 

Helpful resources

Announcements
Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

Microsoft Ignite

Microsoft Power Platform: 2021 Release Wave 1 Plan

Power Platform release plan for the 2021 release wave 1 describes all new features releasing from April through September 2021.

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (66,810)