Re: time help (again)

2008-12-02 Thread Kenneth Gonsalves
On Tuesday 02 Dec 2008 7:53:25 pm Praveen wrote: > second thing open your terminal write python > > >>import datetime > >>help(datetime) dir(datetime) -- regards KG http://lawgon.livejournal.com --~--~-~--~~~---~--~~ You received this message because you are sub

Re: time help (again)

2008-12-02 Thread Adrian Klaver
On Monday 01 December 2008 9:01:11 pm Bobby Roberts wrote: > > http://www.python.org/doc/2.5.2/lib/datetime-timedelta.html > > yeah i said I don't understand this. I found datetimes easier to deal with when I used the modules found here: http://labix.org/python-dateutil As as an example for

Re: time help (again)

2008-12-02 Thread Praveen
Before getting the value you must check of its types which type is you can not find the difference between DateObject-StrObject so you have to have same kind of datatype second thing open your terminal write python >>import datetime >>help(datetime) which will list you all the function. there is o

Re: time help (again)

2008-12-01 Thread humanstalker
Hi Just thought i would help out anyway even though this is solved. d = datetime.datetime.now() - datetime.datetime.strptime (dbValueHere,"%Y-%m-%d") # Does a date diff between today and the date from the DB, change "%Y-%m-%d" to suit the format of you string.Also make sure you set the dbValueHe

Re: time help (again)

2008-12-01 Thread Kenneth Gonsalves
On Tuesday 02 Dec 2008 10:31:11 am Bobby Roberts wrote: > > http://www.python.org/doc/2.5.2/lib/datetime-timedelta.html > > yeah i said I don't understand this. >>> x =datetime(2008,12,10,20) >>> y=datetime(2008,12,10,23) >>> z = y-x >>> z datetime.timedelta(0, 10800) >>> print z 3:00:00 --

Re: time help (again)

2008-12-01 Thread Malcolm Tredinnick
On Mon, 2008-12-01 at 20:52 -0800, Bobby Roberts wrote: > ok day 7 and no luck. I really need help. I need to calculate the > difference between two dates, one pulled from the database, and one as > the NOW time. I'm hoping someone out there can help me and explain > the code to me. Yes I've

Re: time help (again)

2008-12-01 Thread Malcolm Tredinnick
On Mon, 2008-12-01 at 21:01 -0800, Bobby Roberts wrote: > > http://www.python.org/doc/2.5.2/lib/datetime-timedelta.html > > yeah i said I don't understand this. Well, you said you didn't understand "the docs", but you didn't mention which documentation you had found. So Kenneth's answer isn

Re: time help (again)

2008-12-01 Thread Bobby Roberts
> http://www.python.org/doc/2.5.2/lib/datetime-timedelta.html yeah i said I don't understand this. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django

Re: time help (again)

2008-12-01 Thread Kenneth Gonsalves
On Tuesday 02 Dec 2008 10:22:21 am Bobby Roberts wrote: > Can anyone tell me how to do this in python.  I'm coming from an asp > background where there is a built in function to determine this. http://www.python.org/doc/2.5.2/lib/datetime-timedelta.html -- regards KG http://lawgon.livejournal.c

time help (again)

2008-12-01 Thread Bobby Roberts
ok day 7 and no luck. I really need help. I need to calculate the difference between two dates, one pulled from the database, and one as the NOW time. I'm hoping someone out there can help me and explain the code to me. Yes I've read the docs but they don't make sense to me thus the reason i'm