strftime in python 2.2

Martin Blume mblume at socha.net
Mon Aug 13 11:46:21 EDT 2007


"Flyzone"schrieb
> I'm trying to make work this code in python 2.2.3:
> 
> check=datetime.datetime.today().strftime("%H%M")
> 
> but datetime is not supported in that version but 
> just in the later. I can't upgrade python, too many 
> dependencies in a critical system.
> How can i convert that string to have the same result?
> 

import time
time.strftime("%H%M)

HTH
Martin





More information about the Python-list mailing list