Subject: [Zope] Need to use a 'date' data type in sqltest


> I need to include a test of a date in a DTML variable referenced in a sqltest
tag in ZSQL.  From reading documentation and testing, it does not appear that
the 'date' data type is supported.
>
> Can anyone confirm/infirm this and suggest a solution/workaround?

I suppose that Zope supports every Python's type.

Maybe this will help you:

<dtml-let date_str="'2000-01-31'">
<dtml-try>
<dtml-call "REQUEST.set('DateObj',_.DateTime(date_str))">
<dtml-var DateObj>
<dtml-except>
<dtml-var "'%s is not a valid date' %(date_str)">
</dtml-try>
</dtml-let>

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