How to convert datetime.timedelta to string in Python
This following example shows you, how to convert a datetime.timedelta object to a human readable string format in Python.
import datetime
start = datetime.datetime(2020,8,10,13,00)
end = datetime.datetime(2020,8,17,16,00)
delta = end-start
string_delta = str(delta)
print(delta)
Output:
7 days, 3:00:00