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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / String was not recogni...
Power Automate
Unanswered

String was not recognized as a valid DateTime. Creating query failed

(0) ShareShare
ReportReport
Posted on by 53

I am following https://www.youtube.com/watch?v=g_SqkW9ZCR0&t=199s which is very straightforward but I am getting error message found in title.

 

Screenshot 2023-04-28 at 12.57.46 PM.png

I have double checked the spelling of the variable OpenDate. I am not sure why it is throwing the error? Thanks.

 

 

Categories:
I have the same question (0)
  • mclim Profile Picture
    53 on at

    Screenshot 2023-04-28 at 1.14.37 PM.png

    This is OpenDate as screenshot from the the List. 

  • ManishSolanki Profile Picture
    15,091 Super User 2025 Season 2 on at

    Hi @mclim 

     

    You need to format the date column using the below expression:

    ManishSolanki_0-1682659977056.png

     

    expression used for formatting date is mentioned below:

    formatDateTime(utcNow(),'yyyy-MM-dd')

    assuming, OpenDate stores only date but does hold time.

     

    Pls let me know if you face any problem & remember to give a 👍 and accept my solution as it will help others in the future.

     

    Thanks

  • mclim Profile Picture
    53 on at

    Screenshot 2023-04-28 at 1.38.20 PM.png

    @ManishSolanki , in the youtube video screenshot, it uses 'MM/dd/yyyy' which is the US regional date format. So it works without your format of 'yyyy-MM-dd' . But I'm in Malaysia which uses 'dd/MM/yyyy'. And as I have pointed out in the first reply, the format is also 'dd/MM/yyyy'. Thank you.

  • v-peijunz-msft Profile Picture
    Microsoft Employee on at

    Hi @mclim 

     

    Could you please show the error message you received in the Get items in detail?

     

    Based on your description, I have made a simple test for your reference.

    1. I have a Date and time column with the date showing here:

    vpeijunzmsft_1-1682662010835.png

    Here is the flow:

    vpeijunzmsft_2-1682662040977.png

    After running the flow, it got the result here:

    vpeijunzmsft_3-1682662086774.png

     

    But when I use the wrong internal column name in SharePoint list, I got the error message "BadRequest.":

    vpeijunzmsft_0-1682661956469.png

    So I guess the possible reason that you get the error may be the wrong internal column name for your Open Date column used in the filter query.

     

    Please check the correct internal column name by going to your SharePoint list > Settings >List Settings > Choosing the Open Date column, and the correct name format is showed in the last part of the URL:

    vpeijunzmsft_4-1682662362760.png

     

    Hope it helps.

     

    Best regards,

    Sylvia

  • mclim Profile Picture
    53 on at

    @v-peijunz-msft , I received a bad request as shown in my first screenshot. However, the error message is different from yours. I attach a screenshot showing the 'Open Date' . My error message is "String was not recognized as a valid DateTime". However, in Settings column, I confirm it's a 'Date' only.

     

    Please let me know if  you have other suggestions. Thank you!

  • Verified answer
    ManishSolanki Profile Picture
    15,091 Super User 2025 Season 2 on at

    Hi @mclim 

     

    It does not matter to which location you belong because internally SharePoint store the date in UCT format, please try the below expression:

    formatDateTime(utcNow(),'yyyy-MM-dd')

    or you may directly put date in format (yyyy-MM-dd) i.e '2023-04-28' and check the flow result.

     

    Thanks

    Please remember to give a 👍 and accept my solution as it will help others in the future.

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
Michael E. Gernaey Profile Picture

Michael E. Gernaey 523 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 406 Moderator

#3
abm abm Profile Picture

abm abm 245 Most Valuable Professional

Last 30 days Overall leaderboard