Time diff

Skip Montanaro skip at pobox.com
Wed Jan 14 11:37:42 EST 2004


    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




More information about the Python-list mailing list