
53 S.W.3d 145 (2001)
Steven A. MUDLOFF, Appellant Pro Se,
v.
MISSOURI DEPARTMENT OF CORRECTIONS, Respondent.
No. WD 59340.
Missouri Court of Appeals, Western District.
May 29, 2001.
Motion for Rehearing and/or Transfer Denied July 24, 2001.
Application for Transfer Denied September 25, 2001.
*146 Steven A. Mudloff, St. Louis, pro se.
Michael J. Spillane, Jefferson City, for respondent.
Before JOSEPH M. ELLIS, Presiding Judge, HAROLD L. LOWENSTEIN, Judge and PATRICIA BRECKENRIDGE, Judge.
Motion for Rehearing and/or Transfer to Supreme Court Denied July 24, 2001.
ELLIS, Judge.
Steven Mudloff appeals from summary judgment entered in favor of the Missouri Department of Corrections in a declaratory judgment action filed by Mudloff. In his declaratory judgment action, Mudloff asked the Circuit Court for a declaration that the 65 days he spent in the Newton County Jail while awaiting trial should be credited against his sentence.
Our review of a summary judgment entered by the trial court is essentially de novo. Rice v. Huff, 22 S.W.3d 774, 779 (Mo.App. W.D.2000). "Summary judgment will be upheld on appeal if there is no genuine dispute of material fact, and the movant is entitled to judgment as a matter of law." Robbins v. McDonnell Douglas Corp., 27 S.W.3d 491, 496 (Mo.App. E.D. 2000). The parties have both indicated that they do not dispute any of the material facts in the case at bar, and accordingly, we must determine whether the Department of Corrections was entitled to judgment as a matter of law.
In April 1993, Mudloff was charged in Newton County, Missouri, with drug trafficking in the second degree. On April 24, 1994, after having been released on bond, Mudloff failed to appear at trial and capias warrants were issued for his arrest.
*147 On February 11, 1997, Mudloff was arrested in the State of Illinois for possession of cannabis with the intent to deliver. On February 14, 1997, the State of Missouri filed a detainer to prevent his release. On September 19, 1997, Mudloff was convicted in an Illinois circuit court and sentenced to a term of three years in the Illinois Department of Corrections.
Subsequently, Mudloff filed a request for disposition of detainers for the April 1993 case. On December 16, 1997, Mudloff was transferred from the Illinois Department of Corrections to the Newton County Jail pending trial for his April 1993 offense. At that time, he was still serving his Illinois sentence.
On February 19, 1998, Mudloff was convicted of possession of a controlled substance in the April 1993 case. Mudloff was sentenced to seven years in the Missouri Department of Corrections for that offense to be served concurrently with his Illinois sentence.
On July 14, 2000, Mudloff filed a Petition for Declaratory Judgment seeking credit against his sentence for time he spent in jail prior to his Missouri conviction. On July 20, 2000, Mudloff filed an amended petition. In his amended petition, Mudloff claimed that he was entitled to have the 65 days he spent in the Newton County Jail, from December 16, 1997, to February 19, 1998, credited against his sentence in the Missouri Department of Corrections.
On August 17, 2000, the Department of Corrections filed its answer to Mudloff's amended petition. That same day, the Department of Corrections also filed a motion for summary judgment claiming that there were no disputes of material fact and that the Department of Corrections was entitled to judgment as a matter of law. Mudloff filed his response to the motion for summary judgment on September 18, 2000. On November 7, 2000, the trial court issued its Decision, Judgment, Order and Decree granting the Department of Corrections' motion for summary judgment.
We initially note that the parties disagree over which version of the jail time credit statute, § 558.031, applies to this case. "Section 558.031 was amended in 1995, and § 558.031.1, the portion of the statute at issue in this case, was substantially rewritten." Roy v. Missouri Dep't of Corr., 23 S.W.3d 738, 741 n. 1 (Mo.App. W.D.2000). In asserting its position, the Department of Corrections maintains that the version in effect at the time of Mudloff's offense should be applied. On the other hand, Mudloff argues that under § 1.160 the statute in effect at the time of his sentencing should be applied because the newer statute might serve to lessen his sentence. In issuing its judgment, the trial court determined that the statute in effect at the time of the offense should be applied, however, the trial court also held that the Department of Corrections was entitled to judgment as a matter of law under either statute.
As will be seen, the trial court was correct in finding that Mudloff was not entitled to credit for his jail time under either version of § 558.031. Accordingly, we need not determine which version of the statute should be applied under § 1.160. State v. Tivis, 948 S.W.2d 690, 695 (Mo.App. W.D. 1997).
"[C]riminal statutes must be `construed strictly against the [s]tate and liberally in favor of the defendant.'" Goings v. Missouri Dep't of Corr., 6 S.W.3d 906, 908 (Mo. banc 1999) (quoting State v. Jones, 899 S.W.2d 126,127 (Mo.App. 1995)). "When construing a statute, courts are to `ascertain the intent of the legislature from the language used and give effect to that intent, if possible, and to consider the *148 words used in their plain and ordinary meaning.'" Roy, 23 S.W.3d at 744 (quoting Butler v. Mitchell-Hugeback, Inc., 895 S.W.2d 15, 19 (Mo. banc 1995)). "The purpose of section 558.031 undoubtedly is to eliminate the disparity of treatment between indigent defendants, who typically are in custody prior to sentencing, and non-indigents who typically are free on bond prior to sentencing." Goings, 6 S.W.3d at 908.
Mudloff contends that the trial court should have applied the version of § 558.031 in effect at the time he was sentenced. At that time, Section 558.031, RSMo Cum.Supp.1997 stated, in relevant part:
1. A sentence of imprisonment shall commence when a person convicted of a crime in this state is received into the custody of the department of corrections or other place of confinement where the offender is sentenced. Such person shall receive credit toward the service of a sentence of imprisonment for all time in prison, jail or custody after the offense occurred and before the commencement of the sentence, when the time in custody was related to that offense, except:
(1) Such credit shall only be applied once when sentences are consecutive;
(2) Such credit shall only be applied if the person convicted was in custody in the state of Missouri unless such custody was compelled exclusively by the state of Missouri's action; and
(3) As provided in section 559.100, RSMo.
This version of "[t]he statute plainly allows such a credit for time spent in custody `after the offense occurred and before the commencement of the sentence, when the time in custody was related to that offense.'" Goings, 6 S.W.3d at 908 (quoting § 558.031.1, RSMo Cum.Supp.1998) (emphasis in original). Accordingly, under this statutory language, the dispositive issue is whether Mudloff was "in custody related to" the Missouri offense while he was confined in the Newton County Jail. Id. at 907.
During the time that Mudloff was awaiting trial in the Newton County Jail, he was serving the sentence for his Illinois conviction and was not eligible for bail because of that conviction. The reason Mudloff was being held in Missouri rather than Illinois was because of his own motion for disposition of the Missouri detainer. "Generally, credit for time spent in custody is unavailable for offenses unrelated to the one underlying the sentence." Id. at 908; See also State ex rel. Nixon v. Dierker, 22 S.W.3d 787, 790 (Mo.App. E.D.2000) ("Jail time credit cannot be granted for time served on an unrelated offense."). Because Mudloff was being held in custody for a conviction and sentence unrelated to his Missouri offense, he was not being held "in custody related to" the Missouri offense and was not entitled to a credit for his jail time under the 1997 version of § 558.031. See Roy, 23 S.W.3d at 745; State ex rel. Lightfoot v. Schriro, 927 S.W.2d 467, 470 (Mo.App. W.D.1996).
At the time Mudloff committed his offense, § 558.031 RSMo Cum.Supp.1992 stated, in relevant part:
1. A person convicted of a crime in this state shall receive as credit toward service of a sentence of imprisonment all time spent by him in prison or jail both while awaiting trial for such crime and while pending transfer after conviction to the department of corrections or the place of confinement to which he was sentenced. Time required by law to be *149 credited upon some other sentence shall be applied to that sentence alone, except that
(1) Time spent in jail or prison awaiting trial for an offense because of a detainer for such offense shall be credited toward service of a sentence of imprisonment for that offense even though the person was confined awaiting trial for some unrelated bailable offense; and
(2) Credit for jail or prison time shall be applied to each sentence if they are concurrent.
"[T]he basic premise of the statute is that if a defendant is convicted of a crime, he will receive credit toward his sentence for jail time served awaiting trial for the crime. He will not, however, receive credit for jail time served which has already been credited to some other sentence unless one of the exceptions ... is applicable." Lightfoot, 927 S.W.2d at 470.
In arguing that he should be granted credit for the time he spent in the Newton County Jail, while contending that the latter version of § 558.031 should apply, Mudloff relies entirely on language contained in State ex rel. Lightfoot v. Schriro, 927 S.W.2d 467 (Mo.App. W.D.1996), which applied the earlier version of § 558.031. In stating the facts of the case, the court in Lightfoot noted:
Everyone agrees that [the sentence] means that Mr. Lightfoot's first five-year Missouri sentence was to run concurrently with the remainder of Mr. Lightfoot's Kansas sentence, beginning on April 10, 1991, the day Mr. Lightfoot was delivered to Missouri to await trial on the Clay County charges.
Id. at 469. Mudloff claims that through this "ruling" the Court in Lightfoot interpreted § 558.031 to require credit for any time spent after being transferred from another state's department of corrections and held in custody in Missouri pending trial for a Missouri offense.
However, this language from Lightfoot merely describes how the parties to that case interpreted the trial court's determination that Mr. Lightfoot's Missouri sentences should run "concurrently to the sentence or sentences he is serving in the State of Kansas." Id. This language reflects how the parties to that case defined the issues to be addressed on appeal, and Lightfoot did not address whether the time spent in jail in Missouri pending trial was properly credited to Mr. Lightfoot under § 558.031.
Indeed, the actual holding in Lightfoot indicates that no such credit should have been applied. In Lightfoot, the defendant sought credit for time spent in jail following his arrest in Kansas. After his arrest, the State of Missouri lodged a detainer against Mr. Lightfoot for charges pending in Missouri to prevent his release from custody in Kansas. Id. at 468. As a result of the detainer, Mr. Lightfoot was not entitled to bail on his Kansas offense. Id. at 469. Subsequently, Mr. Lightfoot entered guilty pleas to the Kansas charges and was sentenced for those offenses. Id. Four months later, Mr. Lightfoot requested disposition of the charges pending against him in Missouri, and nine months after his Kansas conviction, Mr. Lightfoot was transferred to Missouri for trial. Id. Following a guilty plea and sentence in Missouri, Mr. Lightfoot sought credit under § 558.031 for the time he spent in custody in Kansas after the filing of the Missouri detainer. Id.
After interpreting the applicable statutory language, the court in Lightfoot held:
"We affirm the grant of jail time credit under Section 558.031.1(1), RSMo.1991, for the period after the detainer was filed and prior to Mr. Lightfoot's Kansas convictions but reverse the holding that
*150 Mr. Lightfoot was entitled to credit once he was convicted in Kansas. From that point on Mr. Lightfoot was not held because of the detainer and the court had no authority to make his sentence run concurrently with the portions of his Kansas sentence which he had already served prior to his Missouri convictions."
Id. at 468. The court further stated:
Where sentences imposed at different times or for different periods of time run concurrently, the sentences run together during the time that the periods overlap.... [T]he prisoner is not entitled to credit on the later sentence for the period served prior to such sentence, particularly where the sentences are imposed by different courts in different jurisdictions.
Id. at 473 (quoting 24 C.J.S. Criminal Law § 1582 at 173 (1989)). Thus, under Lightfoot, a defendant is not entitled to credit for time spent awaiting trial if he is already serving a sentence for an unrelated offense.
This Court most recently interpreted the pre 1995 version of § 558.031 in Roy v. Missouri Dept. of Corrections, 23 S.W.3d 738 (Mo.App. W.D.2000). In Roy, we noted that the critical requirement of § 558.031(1) was "that the confinement, whether it be in jail or prison, must be `because of a detainer for such an offense....'" Id. at 745. We then went on to hold:
The time Mr. Roy served in the department of corrections awaiting trial on the Clay County forgery charges was not because of Clay County's detainer. Rather, the time Mr. Roy spent in the department of corrections was because of the imposition of the sentences for his Jackson County felony convictions. Under the plain language of subparagraph (1) of § 558.031.1, the time Mr. Roy served in the department of corrections because of the imposition of the Jackson County sentences does not qualify as credit toward his Clay County sentences.
Id. Roy further held that under § 558.031.1(2) a defendant was not entitled to credit on a concurrent sentence that would give him credit for time spent in custody for an unrelated sentence prior to the imposition of the sentence for which credit was sought. Id. at 746.
Like the defendants in Roy and Lightfoot, Mudloff was serving another sentence during the time in which he was held in the Newton County Jail awaiting trial for his Missouri offense. Therefore, under the applicable case law, Mudloff was not entitled to credit for the time he spent awaiting trial subsequent to his conviction and sentence for the Illinois offense under the pre 1995 version of § 558.031.[1]
Accordingly, Mudloff was not entitled to credit for the time he spent in the Newton County Jail under either version of § 558.031. The trial court did not err in granting summary judgment to the Missouri Department of Corrections.
The judgment is affirmed.
All concur.
NOTES
[1]  See also, State ex rel. Nixon v. Dierker, 22 S.W.3d 787, 790 (Mo.App. E.D.2000) ("We agree that it was improper for the sentencing court to grant Logan jail time credit for the reason that the May 1988 sentence for which he sought jail time credit was unrelated to the prior conviction of November 1986.")
