Legacy platform

Searching for orders by providing a date attribute does not return any orders

Orders are not returned when you search for orders by providing a date attribute, such as OrderDate.

Problem

When you search for orders by providing a date attribute, such as OrderData, the system does not return any orders.

Solution

An attribute of DataType=Date is stored in the database with date and time components. When you create an order, the date attributes, such as OrderDate and RequestedDeliveryDate, get both date and time components. If you have specified only the date component, the time component is populated with the order creation time. The date attribute is indexed with both the components, and searching in the index against a particular Date attribute by specifying only the date component will not return any result. To solve this, use the From and To date attributes, as shown below.

For example, instead of passing the following:

<Order OrderDate="2012-01-09T17:10:20">

Call the API with the following input XML:

<Order FromOrderDate="2012-01-09T17:10:20" ToOrderDate="2012-01-09T17:10:20" OrderDateQryType="DATERANGE">