cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Machine
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
Gopala_Krishna
Solution Sage
Solution Sage

@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
Gopala_Krishna
Solution Sage
Solution Sage

@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.

Machine
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
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

Carousel_PP_768x460_Wave2 (1).png

2022 Release Wave 2 Plan

Power Platform release plan for the 2022 release wave 2 describes all new features releasing from October 2022 through March 2023.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (5,841)