两篇值得看的博客:
https://www.cnblogs.com/huigebj/p/11259449.html
https://blog.csdn.net/zzddada/article/details/102822337
字符串 -> 日期
from datetime import datetime
setTime = ‘2015-04-16‘
now = datetime.strptime(setTime, "%Y-%m-%d")
日期时间段
from datetime import timedelta
delta = datetime.timdelta(days=1) # 用来做加减日期
日期 -> 字符串
now.strptime("%Y-%m-%d")