为什么对时间字符串切片有时候没用?
t = '09:41:58.3'
time1 = 2
mydate1 = datetime.datetime.strptime(t[:8], '%H:%M:%S')
mydate2 = mydate1 + datetime.timedelta(minutes=time1)
为什么对时间字符串切片有时候没用?
t = '09:41:58.3'
time1 = 2
mydate1 = datetime.datetime.strptime(t[:8], '%H:%M:%S')
mydate2 = mydate1 + datetime.timedelta(minutes=time1)