An affidavit for change of judge or magistrate, if against the judge or magistrate who, in the ordinary course, would preside at the hearing or trial, must be filed within the following times:
(1) If there be any motion or application to be heard upon notice, the party resisting the same may file an affidavit not less than two days before the hearing; or if the matter is returnable in a shorter time, then before the commencement of such hearing;(2) If there is no such motion or application:(a) In actions triable without a jury, not less than five days before the date set for trial provided that if the time of trial has been set on less than five days notice, such affidavit shall be promptly filed thereafter and prior to the commencement of the trial;(b) In actions triable by a jury at least fifteen days prior to the date said action is scheduled for trial; and(3) If there has been a prior disqualification and substitution of a judge or magistrate a second or subsequent affidavit for change shall be filed with the clerk of courts of the county wherein such action is pending within two days after receiving notice of the name of the judge or magistrate designated to preside at the trial of said action in place of the judge or magistrate previously disqualified.SDC 1939 & Supp 1960, § 33.1211; SDCL § 15-12-6; Supreme Court Rule No. 3, 1972; Supreme Court Rule No. 75-5, § 8; SL 2009, ch 275 (Supreme Court Rule 08-05), eff. Nov. 1, 2008.