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

Announcements

News and Announcements icon
Community site session details

Community site session details

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

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,649 Super User 2026 Season 1 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,672 Super User 2026 Season 1 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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 592

#2
Valantis Profile Picture

Valantis 340

#3
11manish Profile Picture

11manish 284

Last 30 days Overall leaderboard