Date calculation

Mel Wilson mwilson at the-wire.com
Thu Jul 22 07:21:35 EDT 2004


In article <mailman.706.1090493440.5135.python-list at python.org>,
"David Mostert" <jericoma at yahoo.com> wrote:
>I'm a Newbie.
>
>Is there a method in Python to display yesterday's date?
>
>ie: Yesterday = Today - 1day

import time
yesternow = time.time() - 24 * 60 * 60.0
print time.ctime (yesternow)


Does a little more than you want.

        Regards.        Mel.



More information about the Python-list mailing list