Whenever a person receives evaluation, training, or treatment services under this part or part 5 of this chapter in connection with a criminal charge or conviction, wherever incarcerated, the person must receive credit toward the satisfaction of the sentence for the time spent in the custody of the commissioner.
T.C.A. § 52-5-407