Im retrieving and parsing JSON that has a date/time in a string format ("29/02/2020 04:46:01"). The JSON passes the value to an add row to Excel table function, which imports it as a string.
I've tried using @formatdatetime, but it gives an error stating 'In function 'formatDateTime', the value provided for date time string '29/02/2020 04:46:01' was not valid. The datetime string must match ISO 8601 format.'."
Is there any way to either:
1. Parse the JSON so that the field is parsed as a date/time value?
2. Convert the string output from the JSON to a date/time format that is recognised by Excel?
Gives error " 'In function 'formatDateTime', the value provided for date time string '29/02/2020 04:46:01' was not valid. The datetime string must match ISO 8601 format.'."
The problem is with date format DD/MM "29/02/2020 04:46:01". If you pass MM/DD to formatdatetime, it will be fine.
Here is what you can do and it works good.
concat formula = concat(variables('txtArray'),'/',variables('txtArray'),'/',variables('txtArray'))
formatdatetime formula = formatDateTime(variables('c'),'dd/MM/yyyy hh:mm:ss')
Has your problem been solved?
If your problem has been solved, You could go ahead and mark the post as solved by clicking “Accept as Solution” so that this thread will be marked for other users to easily identify!
Community Support Team _ Lin Tu
Watch Microsoft Business Applications Summit sessions on-demand.
The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Automate Community!
We are excited to announce the launch of Power Virtual Agents Community. Check it out now!
We've updated and improved the layout and uploading format of the Power Automate Cookbook!
Fill out a quick form to claim your user group badge now!
The top training and networking event across the globe for Microsoft Business Applications