
25 So.3d 1253 (2010)
STATE of Florida, Appellant,
v.
Zambia PELHAM, Appellee.
No. 2D08-5557.
District Court of Appeal of Florida, Second District.
January 20, 2010.
Bill McCollum, Attorney General, Tallahassee, and Cerese Crawford Taylor, Assistant Attorney General, Tampa, for Appellant.
John A. Shahan, Tarpon Springs, for Appellee.
*1254 ALTENBERND, Judge.
The State appeals Zambia Pelham's concurrent youthful offender sentences in circuit court cases CRC06-12364CFANO and CRC07-26854CFANO. Because Mr. Pelham committed the offenses in case 07-26854 after his twenty-first birthday, we must reverse and remand that case for resentencing. We affirm the youthful offender sentences imposed in case 06-12364.
Mr. Pelham was born in December 1985. In February 2006, when he was twenty years old, he was arrested and charged with two counts of sale of cocaine and two counts of possession of cocaine. He was released on bond. These charges resulted in case 06-12364. He pleaded guilty to these charges in August 2007. The trial court placed him on twenty-four months of drug offender probation.
When the trial court imposed this sentence, it did not know that Mr. Pelham had committed similar offenses in May 2007, after he turned twenty-one. He had not been arrested at the time of the May offenses. The State did not file an information in case 07-26854 charging Mr. Pelham with the new offenses until December 2007. He was arrested in December for these new offenses and once again was released on bond.
In May 2008, Mr. Pelham violated his drug probation curfew in case 06-12364. This time he was arrested and was not released on bond in that case. However, his bond was not revoked in case 07-26854. At a hearing in October 2008, he pleaded guilty to the new substantive offenses in case 07-26854 and to violating probation in case 06-12364.
At the hearing, Mr. Pelham's scoresheet established a lowest permissible sentence of 23.85 months' imprisonment. His attorney requested that he be sentenced as a youthful offender. The trial court noted that although Mr. Pelham had been in jail for about 170 days, he technically was only accruing jail credit in case 06-12364. The trial court expressed a desire for an "equitable score adjustment" because jail officials "should have come off the bond on the new charges [in case 07-26854]," allowing Mr. Pelham to accrue jail credit for all of his pending cases. The trial court then agreed to sentence Mr. Pelham as a youthful offender in both cases to eighteen months in prison with credit for 172 days of time served. The State objected and argued that Mr. Pelham did not qualify for sentencing as a youthful offender in case 07-26854 because he had committed the offenses after his twenty-first birthday and he was not entitled to jail credit on the charge where bond had not technically been revoked. The trial court overruled the State's objection. On appeal, the State argues only that the sentence could not be imposed as a youthful offender sentence. We agree.
Section 958.04, Florida Statutes (2006), permits a trial court to sentence a defendant as a youthful offender if the crime was committed before the defendant turns twenty-one years old and the defendant otherwise meets the statutory requirements. Because Mr. Pelham committed the second offenses when he was twenty-one, he did not qualify for youthful offender treatment for those offenses. Therefore, it was improper for the trial court to impose a youthful offender sentence in case 07-26854.
We understand the trial court's desire to impose sentences under a single sentencing statute, but unfortunately the law does not give it that discretion. At this point, it appears that the sentence in case 06-12364 has been fully served and that Mr. Pelham has already been released from prison in case 07-26854. The State nevertheless *1255 still has the right to require Mr. Pelham to be resentenced in case 07-26854.
Concerning the 172 days of jail credit, we would comment that it is not unusual for a person to end up in jail accruing jail credit in one case while still technically "released" on bond in another case emanating from the same county. This is normally the result of an oversight within the criminal justice system and not a matter of intent. We frequently see cases in which a trial judge exercises discretion, often with the complete cooperation of the State, to correct this technical problem by granting additional jail credit in the case where bond was not revoked. This act of discretion does not seem inappropriate to this court, and it eliminates a common source of difficult postconviction motions. Thus, while we mandate the trial court to impose a sentence under the criminal punishment code on remand, we are not reversing the award of jail credit that the State did not challenge on appeal.
Affirmed in part; reversed in part; and remanded for further proceedings.
NORTHCUTT and KELLY, JJ., Concur.
