cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
CJRAMER
New Member

MS Form to Planner: DueDate cannot be earlier than the StartDate

Hello everyine, newbie here.

 

I've created a flow triggered by an MS Form to create a planner task for my team.  In the form, the user must choose a desired due date from a date picker calendar.

 

The problem is when the request is urgent due on the same day the request is submitted.  The flow is failing since the due date appears earlier than the request date.  Help please on how to correct this?

 

Flow TS 01.JPG

 

 
  "error": {
    "code""",
    "message""Schema validation has failed. Validation for field 'DueDate', on entity 'Task' has failed: DueDate cannot be earlier than the StartDate",
    "innerError": {
      "date""2021-01-06T15:24:30",
   
Thank you!
1 ACCEPTED SOLUTION

Accepted Solutions
v-yiwenxie-msft
Microsoft
Microsoft

Hi @CJRAMER 

 

My solution is:

 

Although the start date time and due date time is the same day, the two times can be different if you define the date to hour, minute and even second.

 

1.7-4.PNG

 

Use the two function below:

convertFromUtc(utcNow(),'Mountain Standard Time')
addDays(startOfDay(convertFromUtc(utcNow(),'Mountain Standard Time')), 1)

 

The ‘Mountain Standard Time’ can be changed to the time zone you’re in.

Check the link below to choose your time zone: Microsoft Time Zone Index Values | Microsoft Docs

 

If you want to see what those functions mean, go to the link: Reference guide for functions in expressions - Azure Logic Apps | Microsoft Docs

 

Best Regards,
Community Support Team _ Kira Xie
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-yiwenxie-msft
Microsoft
Microsoft

Hi @CJRAMER 

 

My solution is:

 

Although the start date time and due date time is the same day, the two times can be different if you define the date to hour, minute and even second.

 

1.7-4.PNG

 

Use the two function below:

convertFromUtc(utcNow(),'Mountain Standard Time')
addDays(startOfDay(convertFromUtc(utcNow(),'Mountain Standard Time')), 1)

 

The ‘Mountain Standard Time’ can be changed to the time zone you’re in.

Check the link below to choose your time zone: Microsoft Time Zone Index Values | Microsoft Docs

 

If you want to see what those functions mean, go to the link: Reference guide for functions in expressions - Azure Logic Apps | Microsoft Docs

 

Best Regards,
Community Support Team _ Kira Xie
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi!

 

Thank you very much for your help, the addDays funtion worked perfectly!

 

Cheers!

 

emi
Regular Visitor

ok, i used this solution, but it isn't working. The due date sets to the same date as the start date. how do i combine this solution with the due date set by the user in the form (via get response details)?

Helpful resources

Top Solution Authors
Users online (4,144)