phyton 2 7 convert timedelta to string

Solutions on MaxInterview for phyton 2 7 convert timedelta to string by the best coders in the world

showing results for - "phyton 2 7 convert timedelta to string"
Dash
18 Jun 2016
1import datetime
2start = datetime.datetime(2009,2,10,14,00)
3end   = datetime.datetime(2009,2,10,16,00)
4delta = end-start
5print(str(delta))
6# prints 2:00:00