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 format

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I have a sharepoint list which stores"Business Response Date" as a Date.

 

I have a flow which Gets Items and then a query filter of:

Status eq 'Approved' AND @{addDays('Business_x0020_Response_x0020_Date',180)} gt @{utcNow()}

 

I get the error: The datetime string must match ISO 8601 format

 

I have tried various things including adding a 3rd parameter to addDays of 'yyyy-mm-dd' but I'm struggling to figure out what's wrong.

Categories:
  • DeepakS Profile Picture
    2,301 Most Valuable Professional on at

    Hi @Anonymous 

     

    Try following expression:
     
    Status eq 'Approved' AND 
    addDays(formatDateTime('Business_x0020_Response_x0020_Date','yyyy-MM-dd'),180,'yyyy-MM-dd')
        gt
        formatDateTime(utcNow(),'yyyy-MM-dd')
     
    Regards,
    DS
     
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @DeepakS 

     

    Thanks so much for replying.

    I tried as you say and I now get:

    "Unable to process template language expressions in action 'Get_items' inputs at line '1' and column '15867': 'In function 'formatDateTime', the value provided for date time string 'Business_x0020_Response_x0020_Date' was not valid. The datetime string must match ISO 8601 format.'."

  • DeepakS Profile Picture
    2,301 Most Valuable Professional on at

    Hi @Anonymous

     

    Can you add a compose action  before and check what value you getting in Business_x0020_Response_x0020_Date column?

     

    Regards,

    DS

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Business_x0020_Response_x0020_Date output is 2019-12-12T12:01:00Z

  • DeepakS Profile Picture
    2,301 Most Valuable Professional on at

    Hi @Anonymous 

     

    Is this column is empty for any item?

     

    Regards,

    DS

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    No, I only have the 1 item in the list at the moment for testing.

  • DeepakS Profile Picture
    2,301 Most Valuable Professional on at

    Hi @Anonymous 

     

    Interesting, as the date format looks good. would you mind share the full screen capture of the Flow?

     

    Regards,

    DS

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    22062020.PNG

  • Verified answer
    DeepakS Profile Picture
    2,301 Most Valuable Professional on at

    Hi @Anonymous 

     

    Use following expression :

     

    Status eq 'Approved' and Business_x0020_Response_x0020_Date gt 'formatDateTime(addDays(utcNow(),-180),'yyyy-MM-dd')'

     

    Date.jpg

     

    Regards,

    DS

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Brilliant, thank you!

    I did have to change Business_x0020_Response_x0020_Date to Business_x0020_Response_x0020_Da. I'm guessing there's a max name length I've hit. I also changed gt to lt.

    Thanks again!

     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 424

#2
11manish Profile Picture

11manish 328 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 274

Last 30 days Overall leaderboard