Python 1.5.2 -- assigning current time to a variable?

Oleg Broytmann phd at phd.pp.ru
Wed Oct 31 11:28:01 EST 2001


On Wed, Oct 31, 2001 at 04:24:50PM -0000, scott.nadeau at sanmina.com wrote:
> timestring = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())
> 
> Yields:
> TypeError: function requires at least one argument
> 
> How do I pass the argument?

timestring = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime(time.time()))

Oleg.
-- 
     Oleg Broytmann            http://phd.pp.ru/            phd at phd.pp.ru
           Programmers don't die, they just GOSUB without RETURN.




More information about the Python-list mailing list