I have a value that is 6 characters that I want to convert to a 4 position decimal value. For some reason, my little pea brain cannot figure out how to do this! For example, I have the value "000001". I want to be able to convert this string to 00.0001. I've tried a couple of things with DecimalFormat, but still haven't gotten the result I'm looking for. Can anyone give me a push in the right direction? Thanks!
You want an integer padded with left zeros of length six as a string and to parse that into a four–place decimal formatted to have two leading zeros. DecimalFormat will try to make sense of the numbers. This looks like something we can do with a String format method.