Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news.stack.nl!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!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.019 X-Spam-Evidence: '*H*': 0.96; '*S*': 0.00; 'example:': 0.03; 'column': 0.07; 'cc:addr:python-list': 0.11; 'formatted': 0.16; 'from:addr:pobox.com': 0.16; 'from:addr:skip': 0.16; 'strftime': 0.16; 'sender:addr:gmail.com': 0.17; '(the': 0.22; '>>>': 0.22; 'import': 0.22; 'cc:addr:python.org': 0.22; 'skip': 0.24; 'cc:2**0': 0.24; 'header:In-Reply-To:1': 0.27; 'rest': 0.29; 'message-id:@mail.gmail.com': 0.30; "skip:' 10": 0.31; 'yes.': 0.31; 'url:python': 0.33; 'subject:time': 0.33; 'third': 0.33; 'skip:d 20': 0.34; 'could': 0.34; 'objects': 0.35; 'received:google.com': 0.35; 'really': 0.36; 'method': 0.36; 'url:org': 0.36; 'url:library': 0.38; 'how': 0.40; 'full': 0.61; 'simple': 0.61; 'more': 0.64; 'to:addr:gmail.com': 0.65; 'details:': 0.80 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=mSAK/Jpppxe9/Z0l3lU+pH7QJP+eLrG490an3BUQeYk=; b=zIDPHFTTZa/GWERsQVDsUEG1I0QK9SOzVWqnNE2luLEtmNbYymQWb5lEzzKyOrgtOh Y36LkvkRurhAjmxhgGi6T+qg3b+98aKpGADSaNiX3rZWhA9SX9aWQphasAJjXIOf0OH7 RmlU2EpqXeMbn+x6i8bzBy+tHq8rgy8qKEQg/iBzl8GWLTwsCVmg48wT04w2+W6VBDpy 3ue1lKIyT6F2okekJeNyqPPW+QZEG+6pSv43MUlM/PyqQ5BNxYJ7pHbJDAdtblVPAS9O 6S8BbKTVWh/RbkKXrykl/PtwxyQ5qixzeVUCC6ARn3UX6RCgFDmYxDfq0pTYx1TcT2Lt ZVMA== MIME-Version: 1.0 X-Received: by 10.43.14.74 with SMTP id pp10mr666976icb.87.1375456553291; Fri, 02 Aug 2013 08:15:53 -0700 (PDT) Sender: skip.montanaro@gmail.com In-Reply-To: <3e3f0032-3b3b-4c50-99b1-8db3676fb993@googlegroups.com> References: <3e3f0032-3b3b-4c50-99b1-8db3676fb993@googlegroups.com> Date: Fri, 2 Aug 2013 10:15:53 -0500 X-Google-Sender-Auth: _sJb0w4NwcNNtCs2AHMGaWoMPHA Subject: Re: outputting time in microseconds or milliseconds From: Skip Montanaro To: matt.doolittle33@gmail.com Content-Type: text/plain; charset=UTF-8 Cc: Python 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: 21 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1375456557 news.xs4all.nl 15963 [2001:888:2000:d::a6]:37395 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:51818 > is the third column is only the microsecond? Yes. > how could i get this to write with the rest of the time (the hh:mm:ss) ? It sounds like you really want the time formatted in a particular way, not just the numeric value of one or more fields. Look at the documentation for the strftime method of datetime objects for full details: http://docs.python.org/2/library/datetime.html#strftime-and-strptime-behavior Here's a simple example: >>> import datetime >>> now = datetime.datetime.now() >>> now.strftime("%H:%M:%S.%f") '10:14:36.526110' Skip