
575 So.2d 937 (1991)
STATE of Louisiana, Appellee,
v.
Oscar James SWEET, Appellant.
No. 22410-KA.
Court of Appeal of Louisiana, Second Circuit.
February 27, 1991.
*938 E. Roland Charles, for appellant.
William J. Guste, Jr., Atty. Gen., James A. Norris, Dist. Atty., L. Douglas Lawrence, Asst. Dist. Atty., for appellee.
Before NORRIS, HIGHTOWER and VICTORY, JJ.
PER CURIAM.
The maximum sentence of twenty years at hard labor without benefit of parole, probation or suspension of sentence for attempted first degree robbery is neither excessive nor unconscionable for this 38-year-old defendant who was initially charged with armed robbery but plea bargained to the reduced charge. Defendant is a fourth-felony offender, has a substantial criminal record, and was on parole when he committed the instant offense. LA-Const. Art. 1, § 20 (1974); C.Cr.P. Art. 894.1; See also and compare LSA-R.S. 14:27 and 14:64.1 with LSA-R.S. 14:64.

EXCESSIVENESS
The trial court substantially complied with C.Cr.P. Art. 894.1. Citing the very serious nature of the offense and the substantial benefit defendant received from his plea bargain, the trial court emphasized and found as aggravating factors defendant's very significant criminal record going back to 1969 and including three prior felony convictions (burglary, 1973; forgery, 1984; and aggravated burglary, 1985), his sporadic employment history, the serious emotional trauma caused to his female convenience store victim, the potential harm threatened by use of a gun, and no justification for his conduct.
Further reviewing, but finding inapplicable, the mitigating factors (notwithstanding defendant's history of alcohol abuse), the trial judge expressly concluded defendant was the worst kind of offender, was in need of correctional treatment in a custodial environment and that any sentence other than the maximum would deprecate the seriousness of his conduct. C.Cr.P. Art. 894.1. We agree, additionally noting defendant was not multiple billed. LSA-R.S. 15:529.1. Under the facts and circumstances here presented, defendant's sentence as hereinafter amended is not excessive and does not shock our sense of justice.

ERROR PATENT
We find, however, an error patent on the record. The trial court inadvertently failed to allow the defendant credit for time served. Such an allowance is mandatory; no sentencing discretion is involved. C.Cr.P. Art. 880. Accordingly, we amend defendant's sentence without remanding for resentencing to allow him credit for time served. C.Cr.P. Arts. 920(2), 880 and 882A; State v. Fraser, 484 So.2d 122 (La. 1986); State v. Trahan, 520 So.2d 789 (La. App. 3d Cir.1987), writ denied, 532 So.2d 172 (La.1988); State v. Hunt, 573 So.2d 585 (La.App. 2d Cir.1991). As amended, we affirm his conviction and sentence.
CONVICTION AFFIRMED; SENTENCE AMENDED, AND AS AMENDED, SENTENCE AFFIRMED.
