W6 2377 then QR 3683 at Barcelona
Budapest → Barcelona → Santander
Timetable, Barcelona time
20:05W6 2377 from Budapest at the gate
16:05QR 3683 to Santander leaves the gate
20 h apart on the timetable, overnight
QR 3683 leaves 20 h after W6 2377 arrives on the timetable: more than half a day, so not a connection we count.