Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > strftime in python 2.2

Reply
Thread Tools

strftime in python 2.2

 
 
Flyzone
Guest
Posts: n/a
 
      08-13-2007
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

 
Reply With Quote
 
 
 
 
Martin Blume
Guest
Posts: n/a
 
      08-13-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


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
RE: time.strftime Timezone issue Tim Peters Python 1 06-13-2004 04:08 AM
time.strftime Timezone issue Allen Unueco Python 1 06-13-2004 01:42 AM
strftime not working as expected Bryan O'Malley C++ 8 02-17-2004 08:34 AM
strftime - %a is always Monday ? Richard Shea Python 5 12-30-2003 08:04 PM
gcc 3.3, solaris 8, compile error - 'strftime', 'localtime', etc. "not declared" Bimal C Programming 1 08-20-2003 12:33 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57