[Zope] Python DateTime()

Israel Carr icarr at compxnet.com
Thu May 6 10:24:05 EDT 2004


Great. That did it.  

Thanks for the prompt response.

Israel

-----Original Message-----
From: Chris Kratz [mailto:chris.kratz at vistashare.com] 
Sent: Thursday, May 06, 2004 10:20 AM
To: zope at zope.org
Cc: Israel Carr; 'zope at zope.org'
Subject: Re: [Zope] Python DateTime()


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