SV: [Zope] Matching a date that's in a Zcatalog field index

Michel Pelletier michel@digicool.com
Mon, 19 Feb 2001 14:42:13 -0800 (PST)


On Mon, 19 Feb 2001, [iso-8859-1] Geir B=E6kholt wrote:

> >I've set a CreateDate property on a bunch of files--basically, i
> grab the
> >ZopeTime at the time of the DTML Document's creation and write it
> to a
> >CreateDate property of type date. Now I'm trying to pull individual
> dates
> >out of the Catalog--for instance, to show all of the stories
> written today.
> >What's the proper syntax for matching this stuff? This doesn't
> work:
> >
> ><dtml-in "NewsCatalog(CreateDate.Date()=3D_.ZopeTime().Date())">
> >
> ></dtml-in>

Searching for stories written "today" is not an instantaneous moment in
time, but is rather a "range" of time.  For this, you need to do a range
search, which is documented at:

http://www.zope.org/Members/michel/ZB/SearchingZCatalog.html

-Michel