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

Community site session details

Session Id :
Power Automate - Building Flows
Answered

The datetime string must match ISO 8601 format

(0) ShareShare
ReportReport
Posted on by 29

EXCEL_jq8LkncFvV.png

I have a column with date and time in excel and there are empty values. I need to export the table into the Sharepoint list. I used an expression: 

if(empty(items('Apply_to_each')?['Date']), null, formatDateTime(item()?['Date'], 'yyyy-MM-dd HH:mm tt'))

but got an error. How can I solve this?

I have the same question (0)
  • schwibach Profile Picture
    Moderator on at
    Re: The datetime string must match ISO 8601 format

    The string will need to look like this.

    2022-01-13T00:00:00.0000000

     

    So, you're almost there. Just concatenate the individual parts to conform with that example.

  • SM_11 Profile Picture
    29 on at
    Re: The datetime string must match ISO 8601 format

    Hi, thank you for the reply. Could you help me with expression? I know expression for dd/mm/yyyy: 

    concat(split(item()?['Date'],'/')[2],'/',split(item()?['Date'],'/')[1],'/',split(item()?['Date'],'/')[0])

    but I don't understand how to make formula for date with time. Thank you in advance

  • Verified answer
    v-liwei-msft Profile Picture
    on at
    Re: The datetime string must match ISO 8601 format

    Hi @SM_11 

     

    You can try this formula:

    if(empty(items('Apply_to_each')?['Date']),null,formatDateTime(concat(split(items('Apply_to_each')?['Date'],'/')[1],'/',split(items('Apply_to_each')?['Date'],'/')[0],'/',split(items('Apply_to_each')?['Date'],'/')[2]),'yyyy-MM-dd HH:mm'))

     

    Best Regards,

    Levi

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 647 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 350 Moderator

#3
developerAJ Profile Picture

developerAJ 256

Last 30 days Overall leaderboard