Jack Yip, 21, of Smedley Street, previously pleaded guilty to the robbery and appeared at Derby Crown Court on Friday for sentence.
The court heard that around 6.10pm on June 27, Yip approached a young man who was walking through Matlock on his way home from work.
Yip approached the victim, who noticed he appeared intoxicated.
Mrs Esther Harrison, prosecuting, told the court: “The defendant then ran up and caught up with him... [he] pushed the complainant in the chest area and said ‘give me your bag’ and said he would kill him.”
Shocking CCTV footage shows moment man smashes glass into another man's face in Buxton pub
Buxton dad targets Three Peaks in 24 hours to help fellow cancer patients
'World’s best sweet shop’ contents up for auction as Peak District owner sells everything to start new adventure
Derbyshire water provider leaks 446 million litres of water every day – amid record high temperatures and dwindling reservoirs
Man left victim permanently scarred after smashing glass into his face in Buxton pub
The victim gave Yip his bag and then reported the mater to police.
Yip initially denied the offences when he was arrested by police, but the court heard his story unravelled under questioning and he went on to admit the offence.
Passing sentence, Recorder D Smith said: “I don’t know what you were doing. You might not know what you were doing either as you were off your face on drugs, weren’t you?”
The court heard Yip had been taking ecstasy and M-cat on the day of the incident.
Yip, who is of previous good character, has been remanded in custody for the last four months.
Judge Smith said: “You have spent the equivalent of eight months in custody and because of that it seems you can be released today.”
Yip was handed a six month drug rehabilitation order and told he must pay court costs of £900.