Calculate elapsed time between two dates.