0 points

python - How to subtract a day from a date? - Stack Overflow


dashboard

Tue Sep 01 2020 17:25:10 GMT+0000 (UTC)

Posted by @arielvol #python

from datetime import datetime, timedelta

d = datetime.today() - timedelta(days=days_to_subtract)
content_copy Copy

https://stackoverflow.com/questions/441147/how-to-subtract-a-day-from-a-date