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 / ODATA filter query for...
Power Automate
Unanswered

ODATA filter query for date - no outputs

(0) ShareShare
ReportReport
Posted on by

My flow uses a manual trigger to start with a date input (Date added to list). Then I've got a Get items from SharePoint action.

I want to filter so that the Created date in the list equals the input date.

I have tried Created eq 'Date added to list' but it doesn't come up with any outputs even though I have one item with that date.

I thought it might be because Created is a date and time, so have tried using the startswith() and substringof() functions but it didn't like those. I also tried using the formatdatetime expression even though it already seems to be in the correct format.

Is there anything else I can try?

Categories:
I have the same question (0)
  • Sundeep_Malik Profile Picture
    6,484 on at

    Hey @Anonymous 

     

    I think this might be happening because the type of created will be date and time. So, you must be giving just the date in the manual trigger and not the time.

    So, you can try closing the option of time by going into the created column edit settings if possible.

    Thats my 1st solution for you. If this does not work, we will go further.

  • Pstork1 Profile Picture
    68,697 Most Valuable Professional on at

    The created date time field is a system field and can't be changed to Date Only.  Instead of checking for the date being equal you need to use a range.  The date is greater than yesterday at midnight and less than today at midnight.

  • Community Power Platform Member Profile Picture
    on at

    Thanks Sundeep - I think that's the issue too. As far as I'm aware the Created date cannot be updated to date only as it's a system column. But that has given me the idea to create a calculated column based on Created and use that in the query instead - if it's possible to use a calculated column.

  • Community Power Platform Member Profile Picture
    on at

    Thanks @Pstork1 - have also tried that but get this error:

    The expression "Created gt'2022-11-08T00:00:00Z' and le '2022-11-09T00:00:00Z'" is not valid. Creating query failed.

  • Verified answer
    Pstork1 Profile Picture
    68,697 Most Valuable Professional on at

    Two things.

    1) When testing dates I don't think you should be using the single quotes.

    2) You need to use Created in both clauses.  Try the following.

    Created gt 2022-11-08T00:00:00Z and Created le 2022-11-09T00:00:00Z
  • Community Power Platform Member Profile Picture
    on at

    Thank you. I'd missed the need to use Created in both clauses. That worked - I got the output I needed.  The single quotes were still required though:

    calvares_0-1668008287624.png

     

    I wasn't able to use a calculated column in Filter Query by the way.

  • Carls Sagan Profile Picture
    12 on at
    Can anyone explain why the date expression needs to be in single quotes? Is there any microsoft documentation that describes how this particular oData rule?

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 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard