PER CURIAM.
We affirm the judgment of the trial court. However, we remand the case with directions that the trial court amend the sentence, awarding appellant credit for the time he spent in a state hospital as a mentally disordered sex offender. Section 917.218, Florida Statutes (1977); Hall v. State, 358 So.2d 891 (Fla.2d DCA 1978). Appellant need not be present for this purpose.
GRIMES, C.J., and HOBSON and RYDER, JJ., concur.