Sayyiduna Ibn Umar (may Allah be pleased with them both) said that the Prophet (peace and blessings be upon him) said: "Whoever swears an oath about something and says 'In sha' Allah' (if Allah wills) has the choice: if he wishes he may fulfil the oath, or he may leave it."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الأيمان / 19916