IB 5353 then FR 333 at Barcelona
Milan → Barcelona → Gdansk
Timetable, Barcelona time
11:55IB 5353 from Milan at the gate
10:00FR 333 to Gdansk leaves the gate
22 h 05 apart on the timetable, overnight
FR 333 leaves 22 h 05 after IB 5353 arrives on the timetable: more than half a day, so not a connection we count.