SAP Knowledge Base Article - Public

3245716 - OData Filter not working based on Last Change Date for Opportunity

Symptom

An Odata Filter is returning "<message xml:lang="en">Property 2022-07-21T00:00:00 not found in type Opportunity</message> " when filtering on the Last Change Date for Opportunity

Environment

SAP Cloud for Customer

Reproducing the Issue

Open the below URL in Google Chrome and enter the required credentials

https://myXXXXX.crm.ondemand.com/sap/c4c/odata/v1/c4codataapi/OpportunityCollection?$filter=LastChangeDate eq 2022-07-21T00:00:00

You receive the below error:

<message xml:lang="en">Property 2022-07-21T00:00:00 not found in type Opportunity</message>

Cause

Incorrect OData query used for the Service

Resolution

The correct filter URL is as follows:

https://myXXXXX.crm.ondemand.com/sap/c4c/odata/v1/c4codataapi/OpportunityCollection?$filter=LastChangeDate eq datetime'2022-08-02T00:00:00'

Keywords

Date Time, OData, Date Time Filter, OpportunityCollection, Opportunity , KBA , LOD-CRM-INT-API , OData API (C4C Only) , Problem

Product

SAP Cloud for Customer core applications 2208