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

Community site session details

Session Id :
Power Automate - Building Flows
Unanswered

Filtering SPList between Dates

(0) ShareShare
ReportReport
Posted on by 36

Hello,


I am having an issue with filtering an SPList between two dates. I created a flow that queries an SPList and uses PowerApps to ask the user for their Date_From (YYYY-MM-DD) and Date_To (YYYY-MM-DD). I noticed that the date is being stored in UTC, i.e. 2023-11-15T17:18:42Z.

 

I used the convertTimeZone function to make sure that I could convert the time from UTC to Eastern Standard Time. But I am unsure how I use this to create the filter for the SPList. The user will be entering the date, expecting any record created within the EST date (i.e. 11/15/2023 - 11/16/2023). Therefore I need to take this date and look up all rows that match this date in EST format.

 

I hope this makes sense.

 

Screenshot 2023-11-16 at 8.02.28 PM.png

Screenshot 2023-11-16 at 8.02.00 PM.png

I have the same question (0)
  • lbendlin Profile Picture
    8,363 Super User 2025 Season 2 on at
    Re: Filtering SPList between Dates

    Where is your step to fetch the SP list?  You can specify the filter right there in ODATA.

  • v-qiaqi@microsoft.com Profile Picture
    on at
    Re: Filtering SPList between Dates

    Hi @Robert_,

    You just need to configure in a Get items action as below:

    vqiaqimsft_0-1700191727549.png

     

  • Robert_ Profile Picture
    36 on at
    Re: Filtering SPList between Dates

    Hello @lbendlin 

     

    Here is how I am trying to fetch the data. The issue is that the dates in SPList are in UTC but I want to look them up in EST.

     

    Screenshot 2023-11-17 at 7.19.39 AM.png

  • Robert_ Profile Picture
    36 on at
    Re: Filtering SPList between Dates

    @v-qiaqi-msft 

    Thanks but the issue I seem to be having is that the date is not converting to EST. For example, I have data that is from 11/16 but if I query 11/16, I get zero results. If I query 11/17 (to account for UTC), I get results. But the request was on 11/16.

  • lbendlin Profile Picture
    8,363 Super User 2025 Season 2 on at
    Re: Filtering SPList between Dates
    • Your ODATA query is malformed. You need to specify the column name in each comparison.
    • Include the time zone conversion when specifying the values.
  • Robert_ Profile Picture
    36 on at
    Re: Filtering SPList between Dates

    I realized I left off the second Column name.

     

    I cannot figure out how to do the time zone conversion. Can you give me an example? 

     

     

  • Robert_ Profile Picture
    36 on at
    Re: Filtering SPList between Dates

    So I guess I am confused still. Do I even need to convert time? Using the filter, it seems to filter correctly, even though the "created" dates are in UTC, it appears to pull all records within the EST date I select.

     

    Screenshot 2023-11-17 at 8.49.17 AM.png

    For example, if I query 11-16-2023 - 11-16-2023, I get the correct rows, even though there are a few records with a 11-17 UTC but were created actually on 11-16.

    Screenshot 2023-11-17 085319.jpg

     

    So I guess this works as expected.

  • lbendlin Profile Picture
    8,363 Super User 2025 Season 2 on at
    Re: Filtering SPList between Dates

    yes, if your source data is in UTC (as it should be) then no conversion is needed. Otherwise use this: Converting time zone in Power Automate - Power Automate | Microsoft Learn

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 614 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 401 Moderator

#3
chiaraalina Profile Picture

chiaraalina 282

Last 30 days Overall leaderboard