[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: How to lengthen a number

From   Nathan Hutto <>
Subject   st: How to lengthen a number
Date   Wed, 10 Feb 2010 13:37:17 -0500

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,
*   For searches and help try:

© Copyright 1996–2020 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index