For a municipal traffic ticket trial in USA, can a judge put me under oath as I am about to give a closing statement? I declined to testify and accepted to give a closing statement instead. The judge said, “all right. You know what? I’m going to put you under oath anyway. Raise your right hand...” I raised my right hand and acknowledged penalty of perjury. He said, “I’ll accept that as being under oath.”
This wouldn't be customary and is probably improper, but the judge may have been trying to do you a favor.
In the absence of being under oath, the judge could not consider anything said in your closing statement as evidence. If you are under oath, the judge can weigh something you say in your closing statement against the other evidence when making a ruling.