how to just get yesterday date in python and not the month and the year code example
Example: get yesterday date python
>>> from datetime import datetime, timedelta
>>> datetime.strftime(datetime.now() - timedelta(1), '%Y-%m-%d')
'2015-05-26'
>>> from datetime import datetime, timedelta
>>> datetime.strftime(datetime.now() - timedelta(1), '%Y-%m-%d')
'2015-05-26'