FR 5310 then FR 394 at Madrid
Milan Bergamo → Madrid → Ibiza
Timetable, Madrid time
16:10FR 5310 from Milan Bergamo at the gate
13:20FR 394 to Ibiza leaves the gate
21 h 10 apart on the timetable, overnight
FR 394 leaves 21 h 10 after FR 5310 arrives on the timetable: more than half a day, so not a connection we count.