Get yesterday's date
Jeff Bauer
jbauer at rubic.com
Wed Nov 27 09:32:21 EST 2002
Michel, you can use my NormalDate module:
http://starship.python.net/crew/jbauer/normaldate/
>>> from normalDate import ND
>>> today = ND()
>>> yesterday = today - 1
>>> yesterday
20021126
>>>
Regards,
Jeff Bauer
Rubicon Research
Michel COMBE wrote:
>I need to run a SQL query on a MySQL database to get yesterday's records.
>How do I specify "yesterday" ?
>Isn't there some kind of date arithmetic in Python or should I use an
>external library ?
>Which library ?
>
>Thanks for your answer
More information about the Python-list
mailing list