In the Java platform, I'm trying to use the ItemSearch withgiven modified dates in order to find all the Inventory Items updated in a given timestamp range. Unfortunately, my code always returns zero item. However, without the Date filter, 50 of them return properly.
Before invoking the ItemSearch, I call the Date filter as shown below. The 'after' is set to last year from today and the 'upto' is set to today.
public void setTimeRangeFilter(Calendar after, Calendar upto)
{
// create the Date filter
SearchDateField searchDateField = new SearchDateField();
// set the range, [ >after AND <=upto]
searchDateField.setSearchValue(after);
searchDateField.setSearchValue2(upto);
// set the operator
searchDateField.setOperator(SearchDateFieldOperator.within);
// set the search field
itemSearch.setModified(searchDateField);
}
Trung