Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: add zero to values of variable


From   "raoul reulen" <r.c.reulen@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   st: add zero to values of variable
Date   Sat, 3 Jun 2006 13:15:35 +0100

Hi,

I have a variable  which has 2-digit values and 3-values. I would like
to change all 2-digit values into 3 digits  by adding a zero. How can
I do this? Thanks.

Raoul
see example below

the list of values looks like this:

12
148
456
21
364
390

and I would like to add a zero to the third and fourth values.
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



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