Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #70481 > unrolled thread

How to properly get the microseconds from the timestamps?

Started byIgor Korot <ikorot01@gmail.com>
First post2014-04-21 19:38 -0700
Last post2014-04-21 19:38 -0700
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python


Contents

  How to properly get the microseconds from the timestamps? Igor Korot <ikorot01@gmail.com> - 2014-04-21 19:38 -0700

#70481 — How to properly get the microseconds from the timestamps?

FromIgor Korot <ikorot01@gmail.com>
Date2014-04-21 19:38 -0700
SubjectHow to properly get the microseconds from the timestamps?
Message-ID<mailman.9424.1398134329.18130.python-list@python.org>
Hi, ALL,
C:\Documents and Settings\Igor.FORDANWORK\My
Documents\GitHub\webapp\django\mysql_db_loader>python
Python 2.7.5 (default, May 15 2013, 22:43:36) [MSC v.1500 32 bit
(Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import datetime
>>> datetime.datetime.fromtimestamp(1092787200)
datetime.datetime(2004, 8, 17, 17, 0)
>>> datetime.datetime.fromtimestamp(1092787200/1000.0)
datetime.datetime(1970, 1, 13, 7, 33, 7, 200000)

Is there a way to know if the timestamp has a microseconds?

Thank you.

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web