Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.192 X-Spam-Level: * X-Spam-Evidence: '*H*': 0.63; '*S*': 0.02; 'debugger': 0.09; 'stored': 0.12; '23,': 0.16; 'all,': 0.19; 'post': 0.26; 'message- id:@mail.gmail.com': 0.30; 'display': 0.35; 'received:google.com': 0.35; 'shows': 0.36; 'hi,': 0.36; 'thank': 0.38; 'to:addr:python- list': 0.38; 'previous': 0.38; '12,': 0.39; 'to:addr:python.org': 0.39; 'how': 0.40; 'field.': 0.61; 'you.': 0.62; 'field': 0.63; 'as:': 0.81; 'milliseconds': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=vaOxzLIuho8Khqj+x+wp0okz4iH3TMbz/0VZw9wJz30=; b=JBrqNOYM6zYatmeHfl0jETPsTcSFtMQMYkEXa7y6EcRIz6iGSyy2oFf+R8pFzqUFao 9EwYRjhtj7K1MzCc5Vy4khoMY+8CVMZmdApzpjhlAtKS2MzwkC2TOryD8sJFPBtYV1lV errDNDIROKpgN0EINPyfedQNxFXEHTe7qWpZ6Li7SOllyNxdnWqStOlyJTOXPO75LWf3 tRqD4icY9cbaJ3ifeLICgUzsZ+Ix21rr1vQ9Pt4oM/WId7Ekkar4AF9tvf1NmSzS7UBe CraiG6GTToWRbP0recgiveq02bzXmh+a9Mwyl2wm5v/8R8zxd65Y7ws2N/F//e0ToXYl Wgiw== MIME-Version: 1.0 X-Received: by 10.58.229.164 with SMTP id sr4mr14261501vec.18.1391848859235; Sat, 08 Feb 2014 00:40:59 -0800 (PST) Date: Sat, 8 Feb 2014 00:40:59 -0800 Subject: datetime formatting output From: Igor Korot To: python-list@python.org Content-Type: multipart/alternative; boundary=047d7bd6bbf2d5fcc104f1e11090 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 39 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1391848868 news.xs4all.nl 2871 [2001:888:2000:d::a6]:43129 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:65651 --047d7bd6bbf2d5fcc104f1e11090 Content-Type: text/plain; charset=ISO-8859-1 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. --047d7bd6bbf2d5fcc104f1e11090 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Hi, ALL,
I am reading data from the DB (mySQL) where t= he datetime field is stored as:

2012-12-12 23:59:5= 9.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.00009= 9

Notice 3 extra 0's in the milliseconds field= .

How do I display this datetime object properly?

Thank you.

--047d7bd6bbf2d5fcc104f1e11090--