Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #67729 > unrolled thread
| Started by | Igor Korot <ikorot01@gmail.com> |
|---|---|
| First post | 2014-03-04 13:46 -0800 |
| Last post | 2014-03-04 13:46 -0800 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: Proper conversion of timestamp Igor Korot <ikorot01@gmail.com> - 2014-03-04 13:46 -0800
| From | Igor Korot <ikorot01@gmail.com> |
|---|---|
| Date | 2014-03-04 13:46 -0800 |
| Subject | Re: Proper conversion of timestamp |
| Message-ID | <mailman.7747.1393969584.18130.python-list@python.org> |
[Multipart message — attachments visible in raw view] — view raw
MRAB, On Tue, Mar 4, 2014 at 1:38 PM, MRAB <python@mrabarnett.plus.com> wrote: > On 2014-03-04 20:57, Igor Korot wrote: > >> Hi, ALL, >> I'm getting this: >> >> timestamp out of range for platform localtime()/gmtime() function >> >> trying to convert the timestamp with milliseconds into the datetime >> object. >> >> The first hit of Google gives me this: >> >> http://stackoverflow.com/questions/12458595/convert- >> epoch-timestamp-in-python >> >> but the solution described is not good for me since it does not gives >> me the milliseconds value. >> >> How do I get the proper datetime value including milliseconds from the >> timestamp? >> >> Thank you. >> >> Are you using Python 2? If yes, then try dividing by 1000.0. > Yes, I'm using python 2.7. But dividing by 1000 will give the precision in seconds, i.e. "YYYY-MM-DD HH:MM:SS". What I want is to have this: "YYYY-MM-DD HH:MM:SS.XXX", where "XXX" is a milliseconds. Thank you. > > -- > https://mail.python.org/mailman/listinfo/python-list >
Back to top | Article view | comp.lang.python
csiph-web