It is narrated from Sayyiduna Udhaynah (may Allah be pleased with him) that the Messenger of Allah (peace and blessings be upon him) said: "Whoever swears an oath about something, then sees that something else is better than it, let him do that which is better and make expiation for his oath."
Hadith Referenceالمعجم الكبير للطبراني / باب الألف / 869