调用delta的days属性即可得到int值 如:data1=datetime.datetime.strptime("2019-01-12", "%Y-%m-%d")data2=datetime.datetime.strptime("2019-03-12", "%Y-%m-%d")delta=data2-data1 interval=delta.days print(type(interval),interval)结果如下:...