
686 So.2d 740 (1997)
DEPARTMENT OF CORRECTIONS, STATE OF FLORIDA, Appellant,
v.
Kenneth MATTRESS, Appellee.
No. 96-1205.
District Court of Appeal of Florida, Fifth District.
January 10, 1997.
Susan A. Maher, Tallahassee, for Appellant.
No appearance for Appellee.
DAUKSCH, Judge.
Appellant, Department of Corrections, timely appeals an order granting appellee's, *741 Kenneth Mattress', 3.800(a) motion to correct illegal sentence.
In case no. CR89-1082, appellee was charged in two counts with possession and delivery of cocaine. The state attorney nolle prossed the former charge and appellee entered a plea to the latter charge which offense was committed on January 31, 1989. The trial court placed appellee on probation for two years with special conditions. In case no. CR89-6106, appellee entered a plea to the charge of possession of cocaine which offense was committed on June 25, 1989. The trial court placed appellee on probation for two years with the special condition that he serve 364 days in jail with credit for 111 days served. Appellee thereafter entered a plea to violating his probation in both cases after which the trial court adjudicated him guilty of the offenses and sentenced him to two concurrent four-year terms of imprisonment and restored his probation with credit for 440 days served before the imposition of sentence.
On November 5, 1991, after less than three months in jail, appellee was released from the custody of the Department of Corrections (DOC) because of prison overcrowding. On June 17, 1992, he was returned to DOC's custody as a control release violator after having been sentenced in case no. CR91-12092 for a robbery which was committed on November 14, 1991. The Florida Parole Commission revoked appellee's control release supervision effective November 14, 1991. Pursuant to section 944.28(1), Florida Statutes (1991), DOC forfeited 281 days basic gain-time and 42 days additional gain-time earned on appellee's previous four-year terms of imprisonment up to the date of his controlled release on November 5, 1991.
Appellee thereafter filed an amended 3.850 motion for post-conviction relief on the ground that appellant's forfeiture of his gain-time through its retroactive application of section 944.28(1) was violative of the Ex Post Facto Clause because his offenses predated the effective date of section 944.28(1) of September 1, 1990. Construing appellee's motion for post-conviction relief as a 3.800(a) motion to correct illegal sentence, the trial court granted the motion on the ground that his offenses were committed before the effective date of section 944.28(1). Thus, the court ordered DOC to credit appellee with all previously earned gain-time forfeited by DOC.
We agree with appellant that appellee's motion, whether construed as a 3.850 motion for post-conviction relief or as a 3.800(a) motion to correct illegal sentence, is not cognizable because his entitlement to relief, if any, should be obtained through administrative channels and, if necessary, by filing a petition for writ of mandamus naming DOC as the respondent. See Adams v. Wainwright, 275 So.2d 235 (Fla.1973); Smith v. State, 682 So.2d 147 (Fla. 4th DCA 1996); Posey v. Kaplan, 660 So.2d 781 (Fla. 4th DCA 1995). The reason for this is that an award of credit after sentencing is a matter for DOC rather than the trial court as a request for such credit does not affect the legality of the sentence. See Bowles v. State, 647 So.2d 1056 (Fla. 5th DCA 1994); Henderson v. State, 632 So.2d 653 (Fla. 5th DCA 1994); Reynolds v. State, 590 So.2d 1043 (Fla. 1st DCA 1991); Brown v. State, 427 So.2d 821 (Fla. 2d DCA 1983). See also § 921.161(2), Fla. Stat. (1995); Bland v. State, 664 So.2d 35 (Fla. 5th DCA 1995); Grimes v. State, 657 So.2d 938 (Fla. 1st DCA 1995). Conversely, a claim for presentence jail time credit is a matter for the trial court as a request for such credit affects the legality of the sentence. See Henderson; Reynolds. See also § 921.161(1), Fla. Stat. (1995); Brown. That type of claim may be raised in a 3.800(a) motion to correct illegal sentence. Reynolds. Because the requested credit does not affect the legality of appellee's sentence, his motion does not state a basis upon which relief could be granted in this proceeding.
Accordingly, the trial court's order granting appellee's 3.800(a) motion to correct illegal sentence is reversed.
REVERSED.
GRIFFIN and ANTOON, JJ., concur.
