Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Filter Dynamics 365 CRM query on datetime columns issu

Posted on by Microsoft Employee

Hey,

I'm trying to run an OData Query in Dynamics 365 to filter on a datetime field and get the following error:

{ "code": "", "message": "Unrecognized 'Edm.String' literal 'datetime'2017-07-10T10:10:36Z'' at '81' in  'modifiedon ge datetime'2017-07-10T10:10:36Z''.", "innererror": { "message": "Unrecognized 'Edm.String' literal 'datetime'2017-07-10T10:10:36Z'' at '81' in 'modifiedon ge datetime'2017-07-10T10:10:36Z''.", "type": "Microsoft.OData.Core.ODataException", "stacktrace": "...

What is wrong with this query: modifiedon ge datetime'2017-07-10T10:10:36Z'

*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Filter Dynamics 365 CRM query on datetime columns issu

    Hi, I'm having exactly the same issue and get a Bad Request response when filtering accounts using this: modifiedon ge datetime'2017-11-13T13:41:35Z'.

    I've also tried Microsoft.Dynamics.CRM.OnOrAfter(PropertyName=@p1,PropertyValue=@p2)&@p1='modifiedon'&@p2='2017-11-13T13:41:35Z', this doesn't error however it doesn't filter the data returned.

    Has anyone got a solution to this?

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,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans