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

Flow failing (create SharePoint list) due to date format from MS Forms

Hi all. I have a flow that takes data submitted via a form and then sends and email and adds the data to a Sharepoint list.  The problem is that the flow is failing because the data submitted on the form (via the date picker calendar) is not recognised when trying to add to the SharePoint list.

 

I can't change the format in the form, so wondering if there's something I'm missing in either the flow or in the SharePoint list column involved. 

 

Probably a noobie question sorry - Just starting out with Power Automate.

 

Thanks in advance,

Lisa

1 ACCEPTED SOLUTION

Accepted Solutions

 

Hi @Lisa66 ,

 

You can refer to the method provided in this link:

https://powerusers.microsoft.com/t5/Building-Flows/Formatedatetime-ISO-error/m-p/404306#M46260

 

Best Regards,

Community Support Team _ Barry
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

5 REPLIES 5
manuelstgomes
Super User
Super User

Hi @Lisa66 

 

Dates are always a pain in the behind, so don't worry :).

 

Let me try to understand something before. You have a Power Automation that has a trigger "When a new response is submitted," and in that Power Automation, you send an email and try to save it in SharePoint. Do I understand this correctly?

 

If the list column is a "Date/Time" you should be able to insert it directly with the field from the Form that contains a date.

 

If there's nothing proprietary, can you please share the error message and a print of your Power Automation so that I can try to help you further.

 

I'm sure it's just a detail, we'll figure this out 🙂

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Cheers
Manuel

v-bacao-msft
Community Support
Community Support

 

Hi @Lisa66 ,

 

You could use formatDateTime() function to format the date from the response.

19.PNG

 

Best Regards,

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

Hi Manuel.

I've copied the flow below. We have a form that includes date fields which use the date picker calendar. The flow successfully sends the email with date formatted as yyyy/MM/dd which is fine (although we’d prefer dd/MM/yyyy).

 

The next step is to add the form data to a SharePoint list. In the SharePoint list the date columns are of type = date and time, however the date comes through as MM/dd/yyyy.

 

We want the date to populate in the List as dd/MM/yyyy (or same as for the email). We’ve tried formatting the date field in the flow using a formatDateTime expression but the flow fails. So far the only way to show the date in yyyy/MM/dd is to set the List column as type = single line of text

 

The error message received is "Unable to process template language expressions in action 'Create_item' inputs at line '1' and column '23615': 'In function 'formatDateTime', the value provided for date time string 'dd/MM/yyyy' was not valid. The datetime string must match ISO 8601 format.'.”

 

Hope that makes sense!!

Cheers,

Lisa

 

Help test flow - capture.PNG

 

 

Hi @Lisa66 ,

 

You can refer to the method provided in this link:

https://powerusers.microsoft.com/t5/Building-Flows/Formatedatetime-ISO-error/m-p/404306#M46260

 

Best Regards,

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

HI @Lisa66 

 

Just do the following:

  1. Pick the field you can to format the date.
  2. Add a new formula
formatDate(<YourDateField>,'dd/MM/yyyy')

 

Then you'll get your date formatted as you want it to be.

 

Makes sense?

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Cheers
Manuel

 

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.

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.

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Top Solution Authors
Users online (3,658)