
    Charles E. TAYLOR, Appellant, v. The STATE of Florida, Appellee.
    No. 97-3543
    District Court of Appeal of Florida, Third District.
    Jan. 27, 1999.
    Charles E. Taylor, in proper person.
    Robert A. Butterworth, Attorney General and Sylvie Perez-Posner, for appellee.
    Before COPE, GREEN, and FLETCHER, JJ.
   PER CURIAM.

This is an appeal from an order summarily denying the appellant’s petition to have his credit for time served properly calculated by the Department of Corrections and to have his sentencing order reflected accordingly. Specifically, the appellant seeks credit for time served while awaiting sentencing on his probation violation and for time spent in a drug rehabilitation center while on community control.

The state concedes, and we agree, that in addition to the fifty-four (54) days credit already awarded for time spent in jail (i.e. March 13, 1997 through May 5, 1997), in case number 96-39180, the appellant is entitled to an additional forty-eight (48) days credit for time spent in jail (i.e., December 8, 1996 through January 24, 1997) after he was unsuccessfully discharged from the drug treatment center and sentenced on a new charge. A defendant is entitled to credit for all time spent in a detention facility prior to sentencing. See § 921.161(1), Fla. Stat. (1997); State v. Perko, 588 So.2d 980, 981-82 (Fla.1991). Accordingly, we reverse and remand for the court to award credit for such time accordingly.

As to the appellant’s request for credit for time spent at the drug treatment center, however, we conclude he has no entitlement to the same. See Smith v. State, 619 So.2d 994, 994 (Fla. 3d DCA 1993) (‘While a defendant is entitled to ‘credit for all of the time he spent in the county jail before sentence,’ Sec. 921.161(1), Fla. Stat. (1991), he will get no credit for time served in drug rehabilitation centers, halfway houses, and probation and restitution centers.”); see also Tal-Mason v. State, 515 So.2d 738, 740 (Fla.1987) (holding defendant entitled to credit for time served while in mental institution where it constitutes a coercive deprivation of liberty). In the instant case, the appellant’s requirement to attend a drug treatment center is not a deprivation of liberty as to entitle him to credit for time served as contemplated by the statute. Accordingly, we affirm that part of the order denying the appellant credit for such time.

Reversed and remanded in part and affirmed in part.  