I have an azure search index for a table with a field with datatype Edm.DateTimeOffset. And the following filter: $filter=MyDateTimeOffset ge '4/14/2017 6:35:05 AM +00:00' and MyDateTimeOffset le '4/14/2017 7:45:01 AM +00:00'
Invalid expression: A binary operator with incompatible types was detected. Found operand types 'Edm.DateTimeOffset' and 'Edm.String' for operator kind 'LessThanOrEqual'.\r\nParameter name: $filter"
EDIT:
Problem solved, I changed my datetime format to: yyyy-MM-ddTHH:mm:ssZ and removed the quotes
Example: $filter=Timestamp ge 2017-04-14T06:35:05Z
Edm. DateTimeOffset - represents the date and time as an offset in minutes from GMT, with values from 12:00:00 midnight, January 1, 1753 A.D. through to 11:59:59 P.M, December 9999 A.D. For example, 1999-01-01T23:01:00Z corresponds to 11:01:00 PM on January 1, 1999.
The EDM is the underlying abstract data model used by OData services. The subset defined in this class is used for data type definitions of the properties of a table entity in the Windows Azure Storage service.
Azure Cognitive Search (formerly known as "Azure Search") is a cloud search service that gives developers infrastructure, APIs, and tools for building a rich search experience over private, heterogeneous content in web, mobile, and enterprise applications.
Problem solved, I changed my datetime format to: yyyy-MM-ddTHH:mm:ssZ and removed the quotes
Example: $filter=Timestamp ge 2017-04-14T06:35:05Z
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With