datetime formatting output

Discussion in 'Python' started by Igor Korot, Feb 8, 2014.

  1. Igor Korot

    Igor Korot Guest

    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.
    Igor Korot, Feb 8, 2014
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Christos TZOTZIOY Georgiou
    Replies:
    3
    Views:
    691
    Christos TZOTZIOY Georgiou
    Sep 13, 2003
  2. Tim Peters
    Replies:
    0
    Views:
    524
    Tim Peters
    Sep 9, 2003
  3. mp
    Replies:
    1
    Views:
    378
    John Machin
    Jul 28, 2006
  4. Martin
    Replies:
    0
    Views:
    329
    Martin
    Dec 27, 2008
  5. Replies:
    2
    Views:
    745
    M.-A. Lemburg
    Jan 6, 2009
Loading...

Share This Page