calculate_time_difference (function) ∞
-
calculate_time_difference
(startDate, endDate)[source] ∞ Return the time difference between two dates as a string
Key Arguments
startDate
– the first date in YYYY-MM-DDTHH:MM:SS formatendDate
– the final date YYYY-MM-DDTHH:MM:SS format
Return
relTime
– the difference between the two dates in Y,M,D,h,m,s (string)
Usage
from fundamentals import times diff = times.calculate_time_difference(startDate="2015-10-13 10:02:12", endDate="2017-11-04 16:47:05") print diff # OUT: 2yrs 22dys 6h 44m 53s