假设:
stime = []
for item in printList1:
field = item.split()
request_id.append(field[4])
stime.append(field[0])
TIME_FORMAT2 = "%H:%M:%S,%f"
s1 = datetime.strptime(stime[0], TIME_FORMAT2)
print s1
输出:
1900-01-01 08:07:01.080000
如何从输出中获得分钟和小时?