
    Patrick HUGHES, Petitioner, v. Thomas POWERS, Warden, North Dakota State Penitentiary, Respondent.
    Cr. No. 900019.
    Supreme Court of North Dakota.
    March 27, 1990.
    
      Ralph A. Yinje, Bismarck, for petitioner.
    Peter H. Furuseth, Williams County State’s Atty., Williston, for respondent.
   LEVINE, Justice.

This is an original application for a writ of habeas corpus. Patrick Hughes claims that his sentence should have expired January 31,1990, if proper credit were given for 215 days he spent in an inpatient chemical dependency treatment program. We hold that Hughes is not entitled to the credit he seeks and, therefore, we deny his application for the writ.

Hughes pleaded guilty to two counts of robbery and accomplice to robbery and on April 8, 1982, was sentenced to ten years in the state penitentiary with five years of the sentence suspended. He was placed on probation for the suspended five-year period. On August 1, 1986, he was found in violation of the terms of his probation. Pursuant to an order dated September 30, 1986, Hughes was

“sentenced to 2 years imprisonment at the North Dakota State Penitentiary, or alternatively to complete the prescribed program at the Akeela House Therapeutic Community in Anchorage, Alaska. It is expected this program will take 18 months to complete. Mr. Hughes is to receive credit for time served during this period of treatment at the Akeela House. If Mr. Hughes does not comply with the prescribed program at the Akeela House, he is in violation of this Order, and in that event, shall be transported to the North Dakota State Penitentiary to serve the remainder of his 2 year sentence.
(4) At the end of the 2 year sentence, or upon completion of the prescribed program at the Akeela House, Mr. Hughes will then be restored to supervised probation.
(5) Mr. Hughes is to receive credit for 60 days served since he has been incarcerated with regard to this probation revocation proceeding.”

An amended order was issued October 10, 1986. It stated:

“Mr. Hughes is hereby ordered to serve two (2) years of imprisonment, after which he will be returned to supervised probation.
“In lieu of the two years of imprisonment, Mr. Hughes may continue on supervised probation at this time if he attends and complies with the program at the Akeela House in Alaska. Successful completion of this 18 month program will fulfill the two year term of imprisonment. If Mr. Hughes does not comply with the Akeela House program, he will be immediately incarcerated for the balance of the two year period.
“Mr. Hughes will receive credit for 60 days served.”

Hughes entered the Akeela House program but left against the advice of the staff after only 215 days.

In December 1988, Hughes was apprehended in North Dakota. After a probation revocation hearing, he was ordered immediately incarcerated on February 27, 1989 to serve “the remaining time of his sentence at the North Dakota State Penitentiary.... [The] remaining term of [Hughes’] sentence shall end June 28, 1992.” Hughes moved to correct his sentence to reflect credit for the 215 days. His motion was denied. On January 9, 1990, he applied to this Court for a writ of habeas corpus. Hughes does not challenge the revocation of his probation or the length of the sentence imposed except for the failure to credit the 215 days he was at Akeela House. Hughes relies on two bases for his entitlement to credit: the order of September 30, 1986 (hereinafter original order) and NDCC § 12.1-32-02(2).

In seeking to enforce the “guarantee” of credit which he argues is contained in the original order, Hughes disregards in its entirety the amended order dated October 10, 1986. The amended order differs from the original order in two important respects. First, it does not allude to credit for time served during treatment at Akeela House. Second, it states that in lieu of two years imprisonment, Hughes "may continue on supervised probation at this time if he attends and complies with the program at Akeela House.” [emphasis added]. The original order does not characterize as probation Hughes’ attendance at Akeela House.

An amended order may alter a previous order or it may supersede the original order. See People v. Sarver, 102 Ill.App.3d 255, 57 Ill.Dec. 834, 835, 429 N.E.2d 1108, 1109 (1981); 49 C.J.S. Judgments § 262. Here, the amended order covered all items the original order covered but it deleted the provision of credit for time served during the treatment at Akeela House. The amended order thus superseded the original order. Consequently, if Hughes is entitled to credit for the time he was at Akeela House, the source of that credit must be in the amended order. Yet, nothing in the amended order refers to or bestows credit for time spent in the Akeela House program. Nor is there any ambiguity in the amended order about credit for time in Akeela House which we would construe in favor of Hughes. See State v. Drader, 432 N.W.2d 553 (N.D.1988). We conclude that the amended order grants no right to the credit Hughes claims.

Hughes’ second argument is that NDCC § 12.1-32-02(2) entitles him to credit for the 215 days at Akeela House. The statute provides:

“Credit against any sentence to a term of imprisonment shall be given by the court to a defendant for all time spent in custody as a result of the criminal charge for which the sentence was imposed, or as a result of the conduct on which such charge was based. ‘Time spent in custody’ shall include time spent in custody in a jail or mental institution for the offense charged, whether that time is spent prior to trial, during trial, pending sentence, or pending appeal.”

By its terms, the statute requires credit only for time spent in custody. The amended order makes it clear that the time Hughes spent at Akeela House was not time spent in custody. It was, rather, supervised probation. Time spent on probation is not “time spent in custody” under § 12.1-32-02(2). State v. Vavrosky, 442 N.W.2d 433 (N.D.1989). Because Hughes was not in custody while at Akeela House, he is not entitled to credit under § 12.1-32-02(2). Accordingly, we hold that Hughes’ continuing imprisonment is not illegal under either the statute or the amended order.

The writ is denied.

ERICKSTAD, C.J., and MESCHKE, GIERKE and VANDE WALLE, JJ., concur. 
      
      . Hughes unsuccessfully applied for a writ of habeas corpus in district court. We do not entertain original habeas corpus applications unless the district court has refused to grant the writ. NDCC § 32-22-04. See In re Klein, 325 N.W.2d 227, 228 (N.D.1982); LaPera v. Snider, 240 N.W.2d 862, 867 (N.D.1976).
     
      
      . Following a hearing in June 1989, the February 27 order was modified to provide that Hughes’ remaining term of sentence shall expire on December 17, 1991. That modification reflected credit for jail time amounting to 112 days as well as the elimination of some time in overlapping sentences which were to run concurrently.
     