Today =
today = datetime.datetime.now().strftime("%Y%m%d")
90days ago
DD = datetime.timedelta(days=-90)
How do I get today - DD, or 90days ago?
You should be able to subtract time deltas from datetime objects.
today = datetime.datetime.now() DD = datetime.timedelta(days=90) earlier = today - DD earlier_str = earlier.strftime("%Y%m%d")
1.4m articles
1.4m replys
5 comments
57.0k users