Get previous year from datetime.date object in python

前端 未结 0 1752
旧巷少年郎
旧巷少年郎 2020-12-01 21:45

I know this should be simple, and I know I can do the following:

start_date = (datetime.today() - timedelta(days=2 * 365)).strftime("%Y-%m-%d")


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题