The Prophet ﷺ said, "Whoever has to take an oath should swear by Allah or remain silent." (i.e. He should not swear by other than Allah.)
أَنَّ النَّبِيَّ ﷺ قَالَ مَنْ كَانَ حَالِفًا فَلْيَحْلِفْ بِاللَّهِ أَوْ لِيَصْمُتْ
The Prophet ﷺ said, "Whoever has to take an oath should swear by Allah or remain silent." (i.e. He should not swear by other than Allah.)
أَنَّ النَّبِيَّ ﷺ قَالَ مَنْ كَانَ حَالِفًا فَلْيَحْلِفْ بِاللَّهِ أَوْ لِيَصْمُتْ
The Prophet ﷺ said, "Do not swear by your fathers; and whoever wants to swear should swear by Allah."
قَالَ النَّبِيُّ ﷺ لاَ تَحْلِفُوا بِآبَائِكُمْ وَمَنْ كَانَ حَالِفًا فَلْيَحْلِفْ بِاللَّهِ
The Prophet ﷺ said, "Do not swear by your fathers; and whoever wants to swear should swear by Allah." (Using translation from Bukhārī 7401)
رَسُولُ اللهِ ﷺ مَنْ كَانَ حَالِفًا فَلْيَحْلِفْ بِاللهِ لَا تَحْلِفُوا بِآبَائِكُمْ
"أَلَا مَن كَان حالِفًا فَلَا يحْلِفْ إِلَّا بِاللَّهِ، لا تَحْلِفُوا بآبائِكُمْ".
"مَنْ كَانَ حَالِفًا فَلَا يَحْلف إِلا بالله".