6
votes

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

1
Glad you solved it! Please copy your solution into an answer so that others can find it easily.Bruce Johnston

1 Answers

17
votes

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