After a judgment of conviction has been rendered but before execution of the sentence thereon, a trial court may in its discretion, if the defendant states that he desires to appeal, stay execution of the sentence for a period not to exceed thirty days.
SDCL 23A-33-1