15 Jan
2002
15 Jan
'02
9:12 p.m.
From: "Josef Meile" <josef.meile@imes.mavt.ethz.ch>
I just wondering if you can do it with ZCatalogs. I have a product wich I called reserve and it has two fields: startDate and endDate (both field Indexes). The entry of my >python script is a date (let's say currentDate). I just need to do search the objects wich satisfy the following condition: startDate<=currentDate<=endDate.
Yes, this can be done, like so: query['startDate'] = [currentDate] query['startDate_usage'] = 'range:max' query['endDate'] = currentDate query['endDate_usage'] = 'range:min' result = Catalog.searchResults(query)