Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #65652 > unrolled thread
| Started by | Chris Angelico <rosuav@gmail.com> |
|---|---|
| First post | 2014-02-08 19:45 +1100 |
| Last post | 2014-02-08 19:45 +1100 |
| 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: datetime formatting output Chris Angelico <rosuav@gmail.com> - 2014-02-08 19:45 +1100
| From | Chris Angelico <rosuav@gmail.com> |
|---|---|
| Date | 2014-02-08 19:45 +1100 |
| Subject | Re: datetime formatting output |
| Message-ID | <mailman.6528.1391849150.18130.python-list@python.org> |
On Sat, Feb 8, 2014 at 7:40 PM, Igor Korot <ikorot01@gmail.com> wrote: > 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. It's not a milliseconds field, that's why :) The real question is: Why is the datetime you're getting from MySQL putting milliseconds into the microseconds field? Possibly if you show your code for generating those datetime objects, that would help. ChrisA
Back to top | Article view | comp.lang.python
csiph-web