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 / Filter Query compare d...
Power Automate
Answered

Filter Query compare dates error

(0) ShareShare
ReportReport
Posted on by 43
Hello I'm trying to compare dates in a filter query for a SharePoint get items. This the event date format 
  "EventDate""2015-09-14T17:30:00Z"
the expression im comparing it to 
formatDateTime(utcNow(),'yyyy-MM-ddT00:00:01Z')
Is their something I'm doing wrong?
 
Thanks.
 
Error Receiving: The expression "EventDate eq 2024-12-19T00:00:01Z and EventDate eq 2024-12-ThursdayT23:59:59Z" is not valid. Creating query failed.
 
Categories:
I have the same question (0)
  • Suggested answer
    Nived_Nambiar Profile Picture
    18,129 Super User 2025 Season 2 on at
     
    I think you have forget to put single quotes around the expression as Odata filter query requires that.
    Expression should have been like this (for comparing with single date)
     
    DateColumn eq 'DateValue'
     
    Also the second date expressions seems to be incorrect
     
    EventDate eq 2024-12-19T00:00:01Z and EventDate eq 2024-12-ThursdayT23:59:59Z
     
     

    Thanks & Regards,
    Nived N

    Stay connected:
    LinkedIn | YouTube | Blogs

    Was this answer helpful?
    If yes, please mark it as the solution by selecting the checkbox in the discussion thread.
    Your feedback motivates me to keep contributing. Thank you!

  • RT-20121435-0 Profile Picture
    4 on at
    maybe '' is missing. 
    try adding '@{formatDateTime(utcNow(),'yyyy-MM-ddT00:00:01Z')}'
  • Verified answer
    MarkRahn Profile Picture
    1,229 Super User 2025 Season 2 on at
    Hi,
     
    You need to add single quotes around the formatDateTime like this:
    You can see some examples of using Filter Query here:
     
    which has an example of using Dates.
     
    Let me know if you need more help.
     
    This community is supported by individuals freely devoting their time to answer questions and provide support. They do it to let you know you are not alone. This is a community.

    If someone has been able to answer your questions or solve your problem, please click Does this answer your question. This will help others who have the same question find a solution quickly via the forum search.

    If someone was able to provide you with more information that moved you closer to a solution, throw them a Like. It might make their day. 😊

    Thanks
    -Mark

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

#2
Tomac Profile Picture

Tomac 321 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard