[Zope] Python DateTime()

Chris Kratz chris.kratz at vistashare.com
Thu May 6 10:20:28 EDT 2004


Try:

Datetime().strftime('%m-%d-%Y') or somesuch.  Calling with the parenthesis 
gets you an object which you can then call strftime on.  The syntax may not 
be exactly right, but you get the idea.

On Thursday 06 May 2004 10:11 am, Israel Carr wrote:
> I'm trying to use the following line to insert current date:
>
> DateTime.strftime(%m-%d-%Y)
>
> ... and get:
>
> unbound method strftime() must be called with instance as first argument
>
>
> If I just use:
>
> DateTime()
>
> ..I get current date, just not the format I want.
>
> Ideas?
>
> Thanks for your help.
> Israel
>
>
> _______________________________________________
> Zope maillist  -  Zope at zope.org
> http://mail.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://mail.zope.org/mailman/listinfo/zope-announce
>  http://mail.zope.org/mailman/listinfo/zope-dev )



More information about the Zope mailing list