UA 3501 then UA 4166 at O'Hare
Kansas City → Chicago → Madison
Timetable, Chicago time
17:05UA 3501 from Kansas City at the gate
10:45UA 4166 to Madison leaves the gate
17 h 40 apart on the timetable, overnight
UA 4166 leaves 17 h 40 after UA 3501 arrives on the timetable: more than half a day, so not a connection we count.