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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Get Items and Date Filter
Power Automate
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.

Categories:
I have the same question (0)
  • Pstork1 Profile Picture
    69,205 Most Valuable Professional on at

    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.

  • Ianhall1892 Profile Picture
    168 on at

    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
    69,205 Most Valuable Professional on at

    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

    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
    69,205 Most Valuable Professional on at

    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

    Hi thats what ive basically done

  • Pstork1 Profile Picture
    69,205 Most Valuable Professional on at

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

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 570

#2
Valantis Profile Picture

Valantis 405

#3
11manish Profile Picture

11manish 350

Last 30 days Overall leaderboard