472,101 Members | 1,436 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,101 software developers and data experts.

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 2114
"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

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.