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

st: adding leading zeros to variables

From   "Murali Kuchibhotla" <>
Subject   st: adding leading zeros to variables
Date   Sun, 3 Aug 2008 22:04:22 -0500 (CDT)

      I need to create a 9-digit variable out of a variable that is currently 
7 and 8 digits long by adding leading zeros to it. An example is provided 

existing	required
1234567	        001234567
56789012	056789012
Also, please note that in the actual dataset the exact no. of observations 
with either 7 or 8 digits is not known.Any suggestions would be 

Murali Kuchibhotla

*   For searches and help try:

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