Re: time differences

2008-11-28 Thread Horst Gutmann
Please take a look at the documentation for the datetime and time modules :-) >>> import datetime >>> datetime.datetime.strptime('2008-09-16 08:01:16', '%Y-%m-%d %H:%M:%S') -- Horst On Fri, Nov 28, 2008 at 10:13 PM, Bobby Roberts <[EMAIL PROTECTED]> wrote: > On Nov 28, 1:35 pm, "Horst Gutmann"

Re: time differences

2008-11-28 Thread Bobby Roberts
On Nov 28, 1:35 pm, "Horst Gutmann" <[EMAIL PROTECTED]> wrote: > If you convert timea into a normal datetime instance just substract > timea from timeb and you will get a datetime.timedelta instance which > has everything you need :-) > >     import datetime >     a = datetime.datetime(2008, 11,

Re: time differences

2008-11-28 Thread Horst Gutmann
If you convert timea into a normal datetime instance just substract timea from timeb and you will get a datetime.timedelta instance which has everything you need :-) import datetime a = datetime.datetime(2008, 11, 15) b = datetime.datetime.now() print b-a -- Horst On Fri, Nov 2

time differences

2008-11-28 Thread Bobby Roberts
I need to know the # of seconds between two dates for my django application. I believe this has to be done with straight python. I've read the py docs on time functions but it doesn't make sense to me. Can anyone help? Here's my situation: timea='11/15/2008 11:35 AM' timeb=datetime.now() How