UA 8154 then UA 1240 at Newark
Montréal → New York → St Louis
Timetable, New York time
20:34UA 8154 from Montréal at the gate
19:59UA 1240 to St Louis leaves the gate
23 h 25 apart on the timetable, overnight
UA 1240 leaves 23 h 25 after UA 8154 arrives on the timetable: more than half a day, so not a connection we count.