[Zope] ZCatalog and dates

Uros Midic uros.m.zope@sezampro.yu
Tue, 28 Nov 2000 22:51:37 +0100


> If I do a search for both meta_type of "news" a date of 2000/11/16 in the
> goLiveDate field the results page returns "There was no data matching this
> Catalog query". Yet when I do a search for the meta_type of "news" alone I
> see that indeed the Catalog contains 2 entries with 2000/11/16 in the
> goLiveDate field.
>
> Why doesn't it find any entries when I search by date?

If goLiveDate is of DateTime type and is being indexed as a field index, try
using a range, for instance:

<dtml-in "Catalog( { 'meta_type' : 'news',
                                'goLiveDate' : [ someDate , someDate + 1 ],
                                'goLiveDate_usage' : 'range:min:max' } )">
....
</dtml-in>

.... someDate is _.DateTime('2000/11/16 00:00') or something like that.

p.s. It's very hard to catch a particular moment in the time continuum, but
it is easier with a time interval. :-)