Sayyiduna Adi bin Hatim (may Allah be pleased with him) narrates this statement of the Noble Prophet (peace and blessings of Allah be upon him): "Whoever takes an oath and then considers another action better than it, he should do what is better and abandon his oath."
Hadith Referenceصحیح ابن حبان / كتاب الأيمان / 4345
Hadith Gradingفضيلة الشيخ الإمام محمد ناصر الدين الألبانيصحيح - «ابن ماجه» (2108): م.فضيلة الشيخ العلّامة شُعيب الأرناؤوطإسناده قوي