469,592 Members | 1,674 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,592 developers. It's quick & easy.

strftime in python 2.2

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

Aug 13 '07 #1
1 2063
"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
Aug 13 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Richard Shea | last post: by
4 posts views Thread by John Hunter | last post: by
4 posts views Thread by Andy Leszczynski | last post: by
2 posts views Thread by Giovanni Bajo | last post: by
3 posts views Thread by Andrii V. Mishkovskyi | last post: by
1 post views Thread by frankrentef | last post: by
reply views Thread by suresh191 | last post: by
4 posts views Thread by guiromero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.