Time diff

Discussion in 'Python' started by Steve, Jan 14, 2004.

  1. Steve

    Steve Guest

    Hi,

    I have two time strings:

    2004-01-14 19:17:37, and 2004-01-15 01:45:33

    How can I find out the number of minutes/seconds between the two times
    in python? Thanks !!

    Steve
     
    Steve, Jan 14, 2004
    #1
    1. Advertising

  2. Steve> I have two time strings:

    Steve> 2004-01-14 19:17:37, and 2004-01-15 01:45:33

    Steve> How can I find out the number of minutes/seconds between the two
    Steve> times in python?

    >>> import datetime
    >>> help(datetime)


    Help on module datetime:

    NAME
    datetime - Fast implementation of the datetime type.

    FILE
    /usr/local/lib/python2.3/lib-dynload/datetime.so

    CLASSES
    __builtin__.object
    date
    datetime
    time
    timedelta
    tzinfo

    class date(__builtin__.object)
    | Basic date type.
    ...

    or

    http://www.python.org/dev/doc/devel/lib/module-datetime.html

    Skip
     
    Skip Montanaro, Jan 14, 2004
    #2
    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. Cyril Vi?ville

    diff Process under diff users

    Cyril Vi?ville, Jun 29, 2004, in forum: Perl
    Replies:
    1
    Views:
    513
    Joe Smith
    Jun 29, 2004
  2. Berrucho
    Replies:
    2
    Views:
    642
    Infant Newbie
    Dec 5, 2003
  3. A Traveler

    Diff CSS styles for diff INPUT TYPE='s?

    A Traveler, Aug 31, 2004, in forum: ASP .Net
    Replies:
    6
    Views:
    4,930
    Steve Fulton
    Aug 31, 2004
  4. flamesrock
    Replies:
    8
    Views:
    476
    Hendrik van Rooyen
    Nov 24, 2006
  5. Austin Ziegler

    [ANN] Diff::LCS 1.1.0, Diff::LCS 1.0.4

    Austin Ziegler, Aug 8, 2004, in forum: Ruby
    Replies:
    3
    Views:
    195
    Austin Ziegler
    Aug 9, 2004
Loading...

Share This Page