[Zope] RE: ZCatalog: searching by date

Stuart 'Zen' Bishop zen@cs.rmit.edu.au
Wed, 24 Nov 1999 14:34:45 +1100 (EST)


On Tue, 23 Nov 1999, Sachin Shah wrote:

> After reading through the Advanced ZCatalog Searching, I am now wondering 
> if the problem is casting, although after reading the document I am still 
> not clear on the syntax of casting in Zope.


>                  <select name="bobobase_modification_time">

Try changing this to:
    <select name="bobobase_modification_time:date">
This will tell Zope cast the value into a date time (so 
REQUEST.bobobase_modification_time will be a Date time instead of a string).

Also, make sure that when you are doing your search, you are referencing
REQUEST.bobobase_modification_time rather than just bobobase_modification_time
(or else the bobobase_modification_time attribute of request.dtml will 
be aquired instead of the value set in REQUEST). Or call your date parameter
something different that doesn't conflict. 

-- 
 ___
   //     Zen (alias Stuart Bishop)     Work: zen@cs.rmit.edu.au
  // E N  Senior Systems Alchemist      Play: zen@shangri-la.dropbear.id.au
 //__     Computer Science, RMIT 	 WWW: http://www.cs.rmit.edu.au/~zen