OPINION OF THE COURT
Joseph Harris, J.Petitioner contends in a writ of habeas corpus that his conviction in Albany County Court on May 25, 1984 for a violation of probation, following a declaration of delinquency filed on April 17, 1984, and his subsequent resentence upon the original offense for which he was placed on probation, are illegal by reason of his contention that his probation had expired on February 18, 1984.
Petitioner was convicted in Albany County Court of attempted robbery in the second degree, a class D felony, on March 15,1979, and sentenced, on April 19,1979, to a split sentence of 60 days’ imprisonment and five years’ probation. He was given credit for time served, which automatically satisfied the sentence of imprisonment.
On or about December 3,1983, the petitioner was arrested in Schenectady for criminal possession of stolen property. A petition for violation of probation was brought, and a declaration of delinquency was filed on April 17, 1984. He was subsequently found to be a probation violator and was resentenced upon his original conviction for attempted robbery in the second degree to 1 to 3 years’ imprisonment in State prison.*
*788Petitioner contends that the commencement of his probationary sentence should date back to February 19, 1979, the date of commencement of the incarceration for which he was given credit on the date of sentence, April 19, 1979. Accordingly, he contends his term of probation would expire February 18, 1984. His argument is without merit. Defendant’s sentence — both incarceration and probation — commenced as of the time of sentence, April 19,1979. The fact that he was credited with time served with respect to his sentence of incarceration has no significance. It does not move back his date of sentence; it merely gave him a credit which he could apply against the sentence of imprisonment imposed upon him on April 19, 1979. Prior to April 19, 1979 the petitioner was under no sentence, either of incarceration or probation. If he had committed an offense while at the Albany County Jail in, for example, March 1979, prior to his sentence, there could be no violation of probation for such offense. Indeed, if he had received no sentence of imprisonment on April 19, 1979, there would be no question whatsoever but that his term of probation commenced April 19, 1979, regardless of how much preplea and presentence time he had accumulated.
Accordingly, petitioner’s term of probation having commenced April 19, 1979, the normal expiration date of said probation would be April 18,1984. The declaration of delinquency, having been filed on April 17, 1984, was thus filed while the petitioner was still subject to his probationary term, and accordingly his conviction for violation of probation, and his resentence, were in all respects proper.
The writ of habeas corpus is accordingly denied.
Petitioner pleaded guilty in Schenectady County Court on March 27, 1984 to the matter for which he was arrested on December 3, 1983, and was *788sentenced on April 3, 1984, to IV2 to 3 years’ imprisonment in State prison.