I need syntax for retrieving issuestarttime is >= 2 years from today. The pseudo code equivalent is issuestarttime >= DAY(TODAY()) - 760
How to do in web api query (pulling from Dynamics CRM)?
As first step I am trying to merely retrieve data greator than/equal to a given date, but am getting error:
I HAVE TRIED
https://OK.api.crm.dynamics.com/api/data/v8.1/mc_alerts?$select=_mc_symptomtypealertid_value,mc_resolutiontime,mc_alertnumber,statuscode,statecode,mc_fixphases,mc_alertid,%20mc_symptomdurationhours,%20mc_name,%20mc_symptomdurationtotalminutes,%20mc_customersaffected,%20mc_eventdurationdays,%20mc_resolutiontime,%20mc_eventdurationtotalminutes,%20mc_eventdurationminutes,%20mc_businessimpact,%20mc_alertnumber,%20mc_eventdurationhours,%20mc_symptomdurationdays,%20new_totalcustomersimpacted,%20mc_symptomdurationminutes,%20mc_issuestarttime,%20mc_severityid,%20mc_subtypeid,%20mc_symptomtypealertid,mc_fixphases,_mc_severityid_value,mc_reportedstarttime,_mc_subtypeid_value&$filter=statecode%20eq%200%20and%20statuscode%20eq%20100000000%20or%20statuscode%20eq%20100000000%20or%20statuscode%20eq%201%20and%20mc_issuestarttime ge ('2015-06-01 00:00:00')
Error
DataSource.Error: Microsoft.Mashup.Engine1.Library.Resources.HttpResource: Request failed:
OData Version: 3 and 4, Error: The remote server returned an error: (400) Bad Request. (A binary operator with incompatible types was detected. Found operand types 'Edm.DateTimeOffset' and 'Edm.String' for operator kind 'GreaterThanOrEqual'.)
OData Version: 4, Error: The remote server returned an error: (400) Bad Request. (A binary operator with incompatible types was detected. Found operand types 'Edm.DateTimeOffset' and 'Edm.String' for operator kind 'GreaterThanOrEqual'.)
Details:
DataSourceKind=OData
DataSourcePath=https://missioncontrol.api.crm.dynamics.com/api/data/v8.1/mc_alerts
Thanks in advance.
*This post is locked for comments