19 Jun
2000
19 Jun
'00
6:05 p.m.
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