Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Unanswered

Get Items and Date Filter

(0) ShareShare
ReportReport
Posted on by 168

Hi,

I'm having issues with Date filter query with Get Items. I'm trying to bring back results based on a next review date. I'm trying to test on a particular date I know exists in the review date field in a Library. To do this I'm setting a variable with the following formula  

utcNow('2022-05-14') and the set the query to Next_x0020_Review_x0020_Date eq 'variable'
 
This does not return any results however I can get a result with utcNow('2019-08-08'). 
 
 

 

Any tips on what I'm doing wrong would be great as its driving me mad.

  • Pstork1 Profile Picture
    66,968 Most Valuable Professional on at
    Re: Get Items and Date Filter

    Could you show us your code?  The sample you pasted in a previous reply is using eq (Equals)

  • Ianhall1892 Profile Picture
    168 on at
    Re: Get Items and Date Filter

    Hi thats what ive basically done

  • Pstork1 Profile Picture
    66,968 Most Valuable Professional on at
    Re: Get Items and Date Filter

    To get a specific date that contains a time portion you'll need to test whether its greater than yesterday at midnight and more than today at midnight.

  • Ianhall1892 Profile Picture
    168 on at
    Re: Get Items and Date Filter

    Its seems on this particular site some items wont filter without having the time portion adding to the query which frustrating because how can you set a date wit the exact time portion. Amending the date either side of the date dosen't work either 

  • Pstork1 Profile Picture
    66,968 Most Valuable Professional on at
    Re: Get Items and Date Filter

    Try testing with Next_x0020_Review_x0020_Date eq '2022-05-13' . You could be running into an issue with time conversion.  Remember time and date fields are stored with a time component even if they are set for Date only.

  • Ianhall1892 Profile Picture
    168 on at
    Re: Get Items and Date Filter

    If I test the get items filter with this query I get the relevant document back

    Next_x0020_Review_x0020_Date eq '2019-08-08'

     

    I test with Next_x0020_Review_x0020_Date eq '2022-05-14' I don't get a result back even though that date exists int he Library. So I'm puzzled whilst one query works but the other one dosen't

  • Pstork1 Profile Picture
    66,968 Most Valuable Professional on at
    Re: Get Items and Date Filter

    utcnow() doesn't take a specific date as the parameter.  It takes a date format like this

    utcNow('yyyy-MM-ddTHH:mm:ss')

    If you want a future date then you need to use FormatDateTime and AddDays something like this

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

     This would give you a date 22 days in the future from now.

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

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May 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 566 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 516 Super User 2025 Season 1

#3
stampcoin Profile Picture

stampcoin 492