Every court and judge, including former judges of courts of record who served at least four (4) years, justices and clerks thereof, and all justices of the peace, shall have the power to administer oaths and affirmations to witnesses and others concerning any thing or proceeding pending before them.