import datetime x = datetime.datetime(2020, 5, 17) print(x) code example
Example: datetime decreasing date python
from datetime import datetime, timedelta
d = datetime.today() - timedelta(days=days_to_subtract)
from datetime import datetime, timedelta
d = datetime.today() - timedelta(days=days_to_subtract)