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 :
Microsoft Dynamics 365 | Integration, Dataverse...
Answered

Query record by date ODATA WebApi

(0) ShareShare
ReportReport
Posted on by 1,088

Hi, I'd like to query a record by date 

https://org.crm.dynamics.com/api/data/v9.2/contacts?$filter=modifiedon eq 2022-05-02

but it returns empty response 

pastedimage1651528681773v1.png

but I am sure that there are records that match that condition

this is querying all

pastedimage1651528845154v3.png

what am i missing? thx

I have the same question (0)
  • PabloCRP Profile Picture
    1,088 on at
    RE: Query record by date ODATA WebApi

    Nice Tool

  • Verified answer
    Community Member Profile Picture
    on at
    RE: Query record by date ODATA WebApi

    Hi PabloCRP,

    I tested this on my side and get the same result with you. Then I change the url like this:

    https://org.crm.dynamics.com/api/data/v9.2/contacts?$filter=modifiedon ge 2022-05-03 and modifiedon lt 2022-05-04

    It could work fine:

    pastedimage1651564540044v1.png

  • Verified answer
    Guido Preite Profile Picture
    54,084 Moderator on at
    RE: Query record by date ODATA WebApi

    you should use Microsoft.Dynamics.CRM.On instead of eq if you want to consider just the date part, however you can use my tool Dataverse REST Builder to test the filter conditions

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…

Andrés Arias – Community Spotlight

We are honored to recognize Andrés Arias as our Community Spotlight honoree for…

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
DAnny3211 Profile Picture

DAnny3211 359

#2
Abhilash Warrier Profile Picture

Abhilash Warrier 137 Super User 2025 Season 2

#3
Martin Dráb Profile Picture

Martin Dráb 77 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans