cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MattMannion
Advocate I
Advocate I

Creating task from Form submission ("The request is invalid:\r\nCannot convert the literal '2020-06-17T14:28:33' to the expected type 'Edm.DateTimeOffset'.",)

HI All, 

 

I am trying to create a task from a form submission but cannot seem to get the date format to work correctly. 

 

I have tried using the form submission time as the start date but was repeatedly getting errors, So have now started using UTCnow() instead but even then I cannot get the flow to accept the date format. 

 

create task.jpg

 

addDays(body('Convert_time_zone'), 2)

 

error.jpg

 

{
  "error": {
    "code""",
    "message""The request is invalid:\r\nCannot convert the literal '2020-06-17T14:42:17' to the expected type 'Edm.DateTimeOffset'.",
    "innerError": {
      "date""2020-06-17T13:42:17",
      "request-id""3ec31747-bbf1-4123-b13c-cbdec8bc10de"
    }
  }
}

 

Apologies in advance, I know I am going to be bashing my head on the desk when someone advises what I have done wrong. 

 

Kind regards 

Matt 

 

1 ACCEPTED SOLUTION

Accepted Solutions
MattMannion
Advocate I
Advocate I

HI all, 

 

Realised I was using the UTCnow() fucntion wrong, but also found a much simpler solution for what I need. 

 

time.JPG

View solution in original post

2 REPLIES 2
MattMannion
Advocate I
Advocate I

HI all, 

 

Realised I was using the UTCnow() fucntion wrong, but also found a much simpler solution for what I need. 

 

time.JPG

View solution in original post

Hello,

 

Thanks for sharing the scenario and the solution. I can be very helpful for other users in similar situation.

 

 

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

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

Top Solution Authors
Users online (1,058)