[Tutor] Re A question about: Adding seconds to datetime object

Danny Yoo dyoo at hkn.eecs.berkeley.edu
Sun Nov 19 03:01:05 CET 2006


> Is it possible to add seconds to a datetime object and get the result as 
> a new datetime object. I mean when we keep adding, for example, 3600 
> seconds, the date will get changed after 24 iterations. Is it possible 
> to carry out such an operation ?

Hi Asrarahmed,

I want to add that you can find more information about this in the Library 
Documentation:

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

Try reading it and see if what the documentation says makes sense, after 
seeing Kent's examples.  The idea is that it's good to practice reading 
and being able to cull out the useful stuff out of the reference 
documentation.


More information about the Tutor mailing list