see -help format- where you will learn how to add leading zeros
Rich
Nathan Hutto wrote:
> Hi all,
>
> I have a numeric variable "x". Some of the values are 5 digits and
> others are 6 digits. I would like all of the values to be 6 digits, so
> I would like to add a zero to the beginning of the 5 digit values. I
> converted "x" to a string variable, created another string
> variable=="0" and added them together, but that didn't work. Anyone
> know how I can do this?
>
> thank you,
> Nathan
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/