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
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
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,
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