gistlib
You can use the datetime module in Python to get yesterday's date. Here's an example:
datetime
main.pyfrom datetime import date, timedelta yesterday = date.today() - timedelta(days=1) print(yesterday) 100 chars5 lines
from datetime import date, timedelta yesterday = date.today() - timedelta(days=1) print(yesterday)
This will output yesterday's date in the format YYYY-MM-DD.
YYYY-MM-DD
gistlibby LogSnag