FR 9170 then FR 1421 at Barcelona
Stockholm → Barcelona → Budapest
Timetable, Barcelona time
14:55FR 9170 from Stockholm at the gate
14:30FR 1421 to Budapest leaves the gate
23 h 35 apart on the timetable, overnight
FR 1421 leaves 23 h 35 after FR 9170 arrives on the timetable: more than half a day, so not a connection we count.