Skip to main content

Notifications

Power Automate - General Discussion
Answered

Date was not valid. The datetime string must match ISO 8601

(0) ShareShare
ReportReport
Posted on by 145

Hi everybody

in a Excel file I have a data so format 4/13/24 16:30 PM (m/dd/yy and Time)

I need to convert it i 'yyyy-mm-dd' only date without time

I have put this to filter the file

"$filter": "@{formatDateTime('Start_x0020_Date','yyyy-MM-dd')} GE @{triggerBody()['date']}"

 but I get this error: 

'In function 'formatDateTime', the value provided for date time string 'Start_x0020_Date' was not valid. The datetime string must match ISO 8601

Many thanks

  • Verified answer
    Giorgio67 Profile Picture
    Giorgio67 145 on at
    Re: Date was not valid. The datetime string must match ISO 8601

    No, so easy😂

    to fix I have create a filter (@and(greaterOrEquals(formatDateTime(item()?['Start Date'], 'yyyy-mm-dd'), formatDateTime(triggerBody()['date'], 'yyyy-mm-dd')), lessOrEquals(formatDateTime(item()?['Start Date'], 'yyyy-mm-dd'), formatDateTime(triggerBody()['date_1'], 'yyyy-mm-dd')))

    and un SELECT to get only value that I want

    Many thanks ScottShearer for suggest

  • ScottShearer Profile Picture
    ScottShearer 25,150 on at
    Re: Date was not valid. The datetime string must match ISO 8601

    @Giorgio67 

    In you Excel action, set the Date Time format to ISO8601

    image.png

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,580

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,909

Leaderboard