A written motion, other than one which may be heard ex parte, and notice of the hearing thereon must be served at least five days before the time specified for the hearing unless a different period is fixed by rule or order of court. For cause shown such an order may be made on ex parte application. When a motion is supported by an affidavit, the affidavit must be served with the motion; and opposing affidavits must be served at least one day before the hearing unless the court permits them to be served at a later time.
SDCL 23A-41-4