This is an appeal from a sentence of appellant to eight years in the state prison. The sentence was arrived at through plea bargaining and was the sentence recommended by the state. Appellant filed a motion to correct the sentence to give appellant credit thereon for the time he had spent in the county jail prior to imposition of the sentence. The trial court denied the motion stating that at the time he sentenced appellant to eight years, he took into consideration in the sentence the time appellant had served in jail.
Section 921.161(1), Florida Statutes, provides in part as follows:
“ . . . [T]he court imposing a sentence shall allow a defendant credit for all of the time he spent in the county jail before sentence. The credit must he for a specified period of time and shall be provided for in the sentence.”
Under this statute, the sentence should have stated that specified period of time for which credit was being given for jail time prior to sentence.
Reversed and remanded with directions to modify the sentence by specifying the number of days for which appellant is given credit on the eight year sentence for *492time spent in jail prior to sentence. Such may be done by order modifying sentence rather than re-sentencing appellant in open court.
RAWLS, C. J., McCORD and JOHNSON, JJ., concur.