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? Regards, David H. Jones Boeing Phantom Works, Mathematics and Computing Technology 425-865-6924 425-865-2964 (FAX) david.h.jones@boeing.com
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
participants (2)
-
Jones, David H -
Marcel Preda