[Zope] using if with date values

Chris Withers chrisw@nipltd.com
Thu, 16 Nov 2000 11:01:29 +0000


"Herring, William O." wrote:
> 
> I would like to insert into the this sql table the form variable birth.x.
> I would like to do it only if the date variable identification.birthdate is
> greater the that listed below.  I know the current 'if' statement is
> incorrect and probably not even close.  However, I haven't been able to find
> any documentation.  Any ideas or solutions would be appreciated.
> 

I'm assuming that identification.birthdate is a field on a form...
Okay, having dots in your field names on forms will only cause you pain
;-)

Try this:

<INPUT TYPE="TEXT" NAME="indentification_birthdate:date">


> <!--#if expr="identification.birthdate > '08/01/2000' "-->

You should probably use the new DTML syntax too ;-)

Try replacing the above line with:

<dtml-if "indeficiation_birthdate > _.DateTime('01/08/2000')">

HTH,

Chris