In most circumstances if there has been a plea entered by one charged with a crime and the person charged has actually served time in jail as the result of the charge, the court in entering the sentence takes into consideration the total sentence and calculates credit for time served for any remaining jail time to be served.Typically the defense attorney representing the defendant makes the request for credit served before final sentence is imposed. If you do not have a criminal defense attorney representing you, you should retain one.