Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics 365 | Integration, Dataverse...
Answered

Query record by date ODATA WebApi

Posted on by 1,086

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

  • PabloCRP Profile Picture
    PabloCRP 1,086 on at
    RE: Query record by date ODATA WebApi

    Nice Tool

  • Verified answer
    Community Member Profile Picture
    Community Member Microsoft Employee 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
    Guido Preite 54,081 Super User 2024 Season 1 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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans