Answers for "get yesterday python"

5

get yesterday date python

>>> from datetime import datetime, timedelta
>>> datetime.strftime(datetime.now() - timedelta(1), '%Y-%m-%d')
'2015-05-26'
Posted by: Guest on July-28-2020
3

python date get day

import datetime
dt = datetime.datetime.today()
year = dt.year
month = dt.month
day = dt.day
Posted by: Guest on December-18-2020

Python Answers by Framework

Browse Popular Code Answers by Language