Calculate length between two dates