Re: [Python-Dev] How do you get yesterday from a time object

2005-04-19 Thread Patrick DECAT
Hi, I believe it's not the appropriate place to ask such questions. You should check the Python users' list ( http://python.org/community/lists.html ) Anyway, here you go : now = time.time() nowTuple = time.localtime(now) yesterdayTuple = time.localtime(now-60*60*24) Regards, Patrick. 2005/4/19

Re: [Python-Dev] How do you get yesterday from a time object

2005-04-19 Thread Paul Moore
On 4/19/05, Ralph Hilton <[EMAIL PROTECTED]> wrote: > i'm a beginning python programmer. > > I want to get the date for yesterday > > nowTime = time.localtime(time.time()) > print nowTime. > oneDay = 60*60*24 # number seconds in a day > yday = nowTime - oneDay # <-- generates an error > print yd

Re: [Python-Dev] How do you get yesterday from a time object

2005-04-19 Thread Simon Brunning
On 4/19/05, Ralph Hilton <[EMAIL PROTECTED]> wrote: > i'm a beginning python programmer. > > I want to get the date for yesterday This is the wrong place for this question. Nip over to http://mail.python.org/mailman/listinfo/python-list, and I'd be more than happy answer it there... -- Cheers,

[Python-Dev] How do you get yesterday from a time object

2005-04-19 Thread Ralph Hilton
i'm a beginning python programmer. I want to get the date for yesterday nowTime = time.localtime(time.time()) print nowTime. oneDay = 60*60*24 # number seconds in a day yday = nowTime - oneDay # <-- generates an error print yday.strftime("%Y-%m-%d") How can I just get yesterday's day? It a sim