[Zope] Date comparison problem

Arpad Kiss Arpad Kiss" <sekter@mail.matav.hu
Fri, 5 Feb 1999 10:11:45 +0100


Jeff,
I think you should use quotation marks in the if tag: <!--#if
"equal(BeginDate,EndDate)"-->
I haven't found the equal function in the DTML documentation. I have never
use it. Have you ever try this: <!--#if "BeginDate==EndDate"-->?
Arpad

-----Original Message-----
From: Jeff Nielsen <jeffniel@ix.netcom.com>
To: Zope <zope@zope.org>
Date: Friday, February 05, 1999 8:00 AM
Subject: [Zope] Date comparison problem


>I'm trying to build an if statement by comparing two date values
(BeginDate,
>EndDate)retrieved from a SQL query. If the two dates are equal, I just want
>to output the date once otherwise, I want to output both dates. I can't
>figure out how to do this. I have the following chunk of code, but it
always
>evaluates false, even if the two dates are the same.
>
><!--#if equal(BeginDate,EndDate)-->
><!--#var BeginDate fmt=day-->&nbsp;<!--#var BeginDate fmt=Month-->....
>[deleted]
><!--#else-->
><!--#var BeginDate fmt=day-->&nbsp;<!--#var BeginDate fmt=Month-->....
>[deleted]
><!--#/if-->
>
>Any help is appreciated.
>
>Jeff
>jeffniel@ix.netcom.com
>
>
>_______________________________________________
>Zope maillist  -  Zope@zope.org
>http://www.zope.org/mailman/listinfo/zope
>
>