in the str there is a float and I can not deal with it
On Oct 9, 7:20 pm, s...@pobox.com wrote:
lookonThank you for your help.It works. However, I am using Google
lookonApp Engine and cannot import dateutil and epsilon.
>
I don't know how Google App Engine works, but are you not able to install
pure Python modules?
>
lookonAre there any other ways?
>
Take a look at the time.strptime function to generate a tuple, then use
>
t = time.strptime(t imestamp, format)
t1 = datetime.dateti me(*t[0:6])
>
Note that with this solution you will have to handle the timezone offset
yourself.
>
Skip
lookonThank you for your help.It works. However, I am using Google
lookonApp Engine and cannot import dateutil and epsilon.
>
I don't know how Google App Engine works, but are you not able to install
pure Python modules?
>
lookonAre there any other ways?
>
Take a look at the time.strptime function to generate a tuple, then use
>
t = time.strptime(t imestamp, format)
t1 = datetime.dateti me(*t[0:6])
>
Note that with this solution you will have to handle the timezone offset
yourself.
>
Skip
Read the strftime man page on your computer or Google for strftime or read
the Python docs about the time.strftime function. (strftime and strptime
strive to have the same set of format characters.)
Comment