strftime in python 2.2

F

Flyzone

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?

Hope someone can help me,
Thanks in advance
 
M

Martin Blume

"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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,521
Members
44,995
Latest member
PinupduzSap

Latest Threads

Top