> <dtml-if "_.DateTime(startdate).isPast() and
> _.DateTime(expirydate).isFuture()">
> > ...
> > ...
> > </dtml-if>
>
> This gives:
> Error Type: TypeError
> Error Value: __div__ nor __rdiv__ defined for these operands

Is better to put some mor lines from Traceback Exception
To see the modul and the line
>
> The dates are pulled from an access (!) database where they are defined
> as date/time types.
>
>Me confoosed.
>
> Andy G

Me too.


Someting like
<dtml-if "_.DateTime('2000-03-03').isPast() and
_.DateTime('2000-12-02').isFuture()">
STORY
</dtml-if>

or

<dtml-if "ZopeTime('2000-03-03').isPast() and
ZopeTime('2000-12-02').isFuture()">
STORY
</dtml-if>

works on Zope 2.1.4  and Zope 2.1.6

I was thinking that are strings, I have made this  many, many times.



btw: what type are IN ZOPE?

If are date/type in Zope , I guess that you can use something like

<dtml-if "startdate.isPast() and  expirydate.isFuture()">
Maybe you are lucky, I didn't test it :)




PM




_______________________________________________
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )

Reply via email to