FR 4584 then FR 846 at Barcelona
Porto → Barcelona → Milan Bergamo
Timetable, Barcelona time
18:55FR 4584 from Porto at the gate
16:55FR 846 to Milan Bergamo leaves the gate
22 h apart on the timetable, overnight
FR 846 leaves 22 h after FR 4584 arrives on the timetable: more than half a day, so not a connection we count.