Apr-06-2023, 06:54 AM
(This post was last modified: Apr-06-2023, 06:54 AM by Gribouillis.)
(Apr-05-2023, 09:43 PM)tester_V Wrote: I do not see how I can get from this:You can also keep track of a cumulated time difference,
cum_time_dif = datetime.timedelta() # initialize cumulated time difference to a null duration ... t_end = datetime.strptime(end_t, "%m/%d/%Y %I:%M:%S %p") t_start = datetime.strptime(start_t, "%m/%d/%Y %I:%M:%S %p") time_dif = t_end - t_start print(f" Time Difference = {time_dif}-{type(time_dif)}") cum_time_dif += time_dif # increase cumulated time difference ... print(f'Cumulated Time Difference = {cum_time_dif}')