I'm not sure what you're trying to do, but if you want a timedelta of 8 days, 2 hours and 30 minutes you could do this:
from datetime import timedelta days = 8 hours = 2 minutes = 30 seconds = ((hours*60) + minutes)*60 delta = timedelta(days, seconds) -- Tim ^,^ On Tuesday 17 May 2011 at 11:38, Tsolmon Narantsogt wrote: > Hi list > > I'm using datetime.timedelta and i have a problem > > delta = 1 day, 2:30:00 > hours = delta.days * 8 > > how to add 8 + 2:30:00 > > > Regards Tsolmon. > -- > You received this message because you are subscribed to the Google Groups > "Python Ireland" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/pythonireland?hl=en. > -- You received this message because you are subscribed to the Google Groups "Python Ireland" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/pythonireland?hl=en.
