I have a flow that I am trying to build. It's relatively long and has a number of steps.
Trigged by a user completing a Microsoft Form. The form is to indicate availability. It then sends dates from the form in an email with options the email with options would read as "31/08/2022 PM". I want to update my Sharepoint list with the selected option from the email. I've split the response and removed the AM or PM part so I am only left with the date (31/08/2022). However when I try to run the flow I get an error.
I tried formatting the date and it won't allow me to do that either
Can anyone help?
HI @Jamie5,
Have you resolved your problem?
Could you please tell me if you have a date/time column in your SP list to save this extracted date value?
I agree with @David- that the SharePoint list expects date format like "yyyy/MM/dd".
ISO 8601 specifies that the date portion of a Date Time string is always formatted as yyyy-MM-dd. Yours is formatted as dd/MM/yyyy.
formatDateTime(<Dynamic Content>,'yyyy/MM/dd')
If the date comes from as a string, then you may need to break it apart and rearrange it to the correct formatting to use it as a DateTime string. If its a date already then you should be able to use DateTimeFormat.
You can re-organise your date string as this thread described:
You need to use the ISO 8601 date format as noted in the error message. In your formatDateTime expression, use 'yyyy-MM-dd' as the format instead of 'dd/MM/YYYY'.