Time diff

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Steve

    Time diff

    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

  • Skip Montanaro

    #2
    Re: Time diff


    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?
    [color=blue][color=green][color=darkred]
    >>> import datetime
    >>> help(datetime)[/color][/color][/color]

    Help on module datetime:

    NAME
    datetime - Fast implementation of the datetime type.

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

    CLASSES
    __builtin__.obj ect
    date
    datetime
    time
    timedelta
    tzinfo

    class date(__builtin_ _.object)
    | Basic date type.
    ...

    or



    Skip

    Comment

    Working...