[ZODB-Dev] Date Conversion in Zope

Andreas Jung andreas at andreas-jung.com
Tue Jun 3 00:16:39 EDT 2003



--On Montag, 2. Juni 2003 20:57 Uhr +0000 enrica dente 
<enrica_dente at hotmail.com> wrote:

>
> The code I have found on Zope.org works ony if you accept in the imput
> box the american date format (MM,DD,YYYY) and not (DD,MM,YYYY).

All supported data formats are described in DateTime.py. German date formats
can only be parsed if the date is not ambigious. Zope 2.7 will solve this 
problem.
>
> In the form:
> <input type="text" name="EventDate:date" size="25">
>
> In the DTML method:
> <dtml-call "REQUEST.set('EventDate', EventDate.strftime('%Y/%m/%d'))">
>
> How do I change EventDate into the (DD,MM,YYYY) format?
>
.by passing the correct format string to strftime(). Check the DateTime
API for details.

-aj




More information about the ZODB-Dev mailing list