Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Azure search filter Edm.DateTimeOffset

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

like image 550
1408786user Avatar asked Apr 14 '17 09:04

1408786user


People also ask

What is EDM DateTimeOffset?

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.

What is EDM in Azure?

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.

What is azure search 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.


1 Answers

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

like image 189
1408786user Avatar answered Oct 13 '22 01:10

1408786user