1. Home
  2. Knowledge Base
  3. FAQs
  4. Consuming the service
  5. How to filter date attributes using OData?

How to filter date attributes using OData?

The OData query option $filter is used to restrict the set of items returned by a collection. To filter Date, Time or Datetime attributes use the following formats:

  • Date yyyy-MM-dd
    https://host/service/Order?$filter=ExpectedClosedOn gt 2020-06-01
  • Datetime yyyy-MM-ddTHH:mm:ssZ
    https://host/service/Order?$filter=RequiredOn ge 2020-06-01T21:00:01Z
  • Time HH:mm:ss.SSSSSSS
    https://host/service/Store?$filter=OpeningHour le 13:00:00.0000001


Click here to check other OData query options and functions supported by Hubway.

Was this article helpful?

Related Articles

Need Support?

Can't find the answer you're looking for?
Contact Support