[Zope] Zope Date format conversion problem

Dylan Reinhardt zope at dylanreinhardt.com
Thu Oct 9 02:25:03 EDT 2003


On Wed, 2003-10-08 at 23:15, K. Praveen Kumar wrote:
> <input type="text" name="date2" size="15" value="">
<snip>
>      <dtml-call "REQUEST.set('date2',date2.strftime('%Y/%m/%d'))">

Unless I'm misreading, your problem is that date2 is a string and
therefore doesn't have a strftime() method.  But your traceback probably
told you *that* much. :-)

To fix this, convert the string to a date using strptime().  If you're
on Win32, you may not have strptime() and may need to find one of the
many third party implementations available online.

HTH,

Dylan




More information about the Zope mailing list