JA 5171 then AV 8528 at Bogotá
Santa Marta → Bogota → Riohacha
Timetable, Bogota time
16:15JA 5171 from Santa Marta at the gate
14:10AV 8528 to Riohacha leaves the gate
21 h 55 apart on the timetable, overnight
AV 8528 leaves 21 h 55 after JA 5171 arrives on the timetable: more than half a day, so not a connection we count.