web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / The datetime string mu...
Power Automate
Unanswered

The datetime string must match ISO 8601

(0) ShareShare
ReportReport
Posted on by 565

 

Hi,

 

I am reading a CSV file with one row of data and add this to a Dataverse table.

The CSV has this format:

 

Accion,IDEmpleado,Nombre,Primer apellido,Segundo apellido,Fecha,Departamento,IDManager,Duracion prueba,Fecha nacimiento,CodBaja
Alta,003968,PETER,SOUMXX,CARNXXX,17/10/23,TRANSF_EXCUR_ALC,001071,6,12/05/93,

 

And I need to take the two dates:

 

17/10/23

12/05/93

 

But when I open the CSV file in Excel, I get the year in format yyyy.

 

Excel.png

 

So, I have a flow that get the CSV, Parse JSON the content and get these data:

 

ParseJson.png

 

And when I want to add a row to a Dataverse table, I get this error:

 

Unable to process template language expressions in action 'Add_a_new_row' inputs at line '0' and column '0': 'In function 'formatDateTime', the value provided for date time string '17/10/23' was not valid. The datetime string must match ISO 8601 format.'.

 

In the Add New Row action, I have this formula in the dates fields:

 

formatDateTime(item()['Nacimiento'], 'MM-dd-yyyy')
 
AddRow.png
 
It has been working for a while, but I do not know why is not working now.
Thanks for any help!
Categories:
I have the same question (2)
  • lbendlin Profile Picture
    8,474 Super User 2025 Season 2 on at

    ISO-8601 is YYYY-MM-DDTHH:NN:SS.FFFF (plus time zone)

  • EmilioRoqueta69 Profile Picture
    565 on at

    Hi, is there any way to apply this format to a value, like this?

     

    formatDateTime(item()['Fecha'], 'MM-dd-yyyy')

  • Verified answer
    Chriddle Profile Picture
    8,436 Super User 2025 Season 2 on at

    The function formatDateTime() can only handle values that are recorgnized as date string by PA.

    This can be ISO-8601 or some American localisations.

    Here you need the function parseDateTime() to convert your value to ISO-8601.

    https://learn.microsoft.com/en-us/azure/logic-apps/workflow-definition-language-functions-reference#parseDateTime

     

    parseDateTime('17/10/23', 'es-es')

    This returns the value '2023-10-17T00:00:00.0000000' that can be formatted with function formatDateTime(), if needed.

  • EmilioRoqueta69 Profile Picture
    565 on at

    It works in this way:

     

    parseDateTime(item()['Nacimiento'], 'es-es')

     

    Thank you!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard