FR 7070 then FR 8345 at Madrid
Gdansk → Madrid → Krakow
Timetable, Madrid time
19:55FR 7070 from Gdansk at the gate
11:40FR 8345 to Krakow leaves the gate
15 h 45 apart on the timetable, overnight
FR 8345 leaves 15 h 45 after FR 7070 arrives on the timetable: more than half a day, so not a connection we count.