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


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

datetime formatting output

Started byIgor Korot <ikorot01@gmail.com>
First post2014-02-08 00:40 -0800
Last post2014-02-08 00:40 -0800
Articles 1 — 1 participant

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


Contents

  datetime formatting output Igor Korot <ikorot01@gmail.com> - 2014-02-08 00:40 -0800

#65651 — datetime formatting output

FromIgor Korot <ikorot01@gmail.com>
Date2014-02-08 00:40 -0800
Subjectdatetime formatting output
Message-ID<mailman.6527.1391848868.18130.python-list@python.org>

[Multipart message — attachments visible in raw view] — view raw

Hi, ALL,
I am reading data from the DB (mySQL) where the datetime field is stored as:

2012-12-12 23:59:59.099

When I retrieve this date I am successfully see under debugger the
dateteime object with (2012, 12, 12, 23, 59, 59, 099)

However as you can see from my previous post this date shows up incorrectly
as:

2012-12-12 23:59:59.000099

Notice 3 extra 0's in the milliseconds field.

How do I display this datetime object properly?

Thank you.

[toc] | [standalone]


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


csiph-web