"0000" is a number format. Its results are not defined for a string input and it generally passes the string straight through.
However it gets really confused if confronted with something it can see meaning in. The "P" is causing Format() to see the value as a Time (PM). You will get the same result when you include an "A" instead.
You need to tell us what you are trying to do. Post some examples of the input and what you want them to look like after being processed.