timedelta

1 from datetime import datetime
2 start="09:35:23"
3 end="10:23:00"
4 start_dt = datetime.strptime(start, '%H:%M:%S')
5 end_dt = datetime.strptime(end, '%H:%M:%S')
6 diff = (end_dt - start_dt) 
7 diff.seconds/60 

 

转载于:https://www.cnblogs.com/yiliweichinasoft/p/3967270.html

你可能感兴趣的:(timedelta)