Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
1 Ответить
5730 Представления

How Can I make this end_time = datetime.now()
in seconds only, 

I have a start_time = datetime.now() and a end_time datetime.now()

I want to find the difference in seconds. 

How can I do that in python.?


I have testet this: with start_time = datetime.now() and end_time = datetime.now()

start_time = 2016-06-30 07:15:26.273169

end_time = 2016-06-30 07:15:26.273153

Then I do a final_time = (end_time - start_time).total_seconds()

it give me this back:  float -1.6e-05

How can I convert this in hours and minutes?

Аватар
Отменить
Лучший ответ

See how to do it here

http://stackoverflow.com/questions/4362491/how-do-i-check-the-difference-in-seconds-between-two-dates

Аватар
Отменить
Автор

hmm not really , I have edit my question

Related Posts Ответы Просмотры Активность
3
мар. 24
4382
0
апр. 18
5594
2
янв. 24
2599
8
мая 23
61336
DateTime Python Решено
4
февр. 23
71702