Skip to main content
Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Unanswered

Trouble with my ODATA Filter and Created field

(0) ShareShare
ReportReport
Posted on by 192

Hello,  i am trying to create an ODATA filter to only pull records that are X days old.  right now i am just trying to pull the list, put that data in an HTML table and then email it to myself.   i see my records when i remove the filter, but not when i have it on, i just get an empty email.

 

i have tried both of these, but neither seems to work.

Created eq 'body('Get_Past_time')'

Created eq 'formatDateTime(body('Get_Past_time'),'yyyy-MM-dd')'

 

Created is the date the record was created on my SP list, Get past time is currently set to 35 Days, meaning i should be pulling any record that was created on 1/1/23.  

 

What am i doing wrong here?

 

Frac_1-1701876299774.png

 

Frac_2-1701876377247.png

 

 

  • Frac Profile Picture
    192 on at
    Re: Trouble with my ODATA Filter and Created field

    @wskinnermctc @happyume  my Created field includes time, so the full value is something like 2023-04-03T14:23:28Z.  do i need to apply a formula to my created field so that it strips the time and leaves only the date?  could that be why it's coming up with zero records?

  • wskinnermctc Profile Picture
    6,517 Super User 2025 Season 1 on at
    Re: Trouble with my ODATA Filter and Created field

    @happyume the datetime functions have an optional format parameter, so the use of formatDateTime isn't necessary. I think people use it out of habit, but removing it cleans expressions up.

    Created eq '@{addDays(utcNow(), -35, 'yyyy-MM-dd')}'

     

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

    addDays(utcNow(),35,'yyyy-MM-dd') = formatDateTime(addDays(utcNow(),35),'yyyy-MM-dd')

    convertfromUtc(utcNow(), 'Central Standard Time', 'yyyy-MM-dd')

     

    Just an FYI for examples

  • Mitanshu Profile Picture
    1,635 Super User 2025 Season 1 on at
    Re: Trouble with my ODATA Filter and Created field

     

    Created eq '@{formatDateTime(addDays(utcNow(), -35), 'yyyy-MM-dd')}'

     

     

    Use^ above in the Filter Query area

     

    happyume_0-1701877785214.png

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If this post or my previous reply was useful in other ways, please consider giving it Thumbs Up.

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1