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 Platform Community / Forums / Power Automate / The datetime string mu...
Power Automate
Unanswered

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?

Categories:
I have the same question (0)
  • schwibach Profile Picture
    2 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

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
Tomac Profile Picture

Tomac 497 Moderator

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 477 Super User 2025 Season 2

#3
chiaraalina Profile Picture

chiaraalina 242

Last 30 days Overall leaderboard