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

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
Highlighted
Frequent Visitor

Re: 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, 

 

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
Highlighted
Frequent Visitor

Re: 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, 

 

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

Highlighted
Microsoft
Microsoft

Re: 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'.",)

Hello,

 

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

 

 

Helpful resources

Announcements
firstImage

Super User Program Update

Three Super User rank tiers have been launched!

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

Top Kudoed Authors
Users online (7,388)