Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: Leading Zero's


From   "Alexander Quarshie" <[email protected]>
To   "<"<[email protected]>
Subject   st: RE: Leading Zero's
Date   Tue, 01 Jul 2003 14:03:59 -0400

Dear all,
Does anyone know a quick way in STATA to add leading zeros to a numeric variable (even if I have to convert it to a string, that would be okay). 
A typical example might be to convert the following numbers to a standard five-digit number with leading zeros:
2 -->  00002
33 --> 00033
473 --> 00473
59724 --> 59724
Thanks.



Alexander Quarshie, MD, MS
Biostatistician
Clinical Research Center
Morehouse School of Medicine
720 Westview Dr. S.W.
Atlanta, GA 30310
(office) 404.752.8681
(fax) 404.752.1154
email:[email protected]

BEGIN:VCARD
VERSION:2.1
X-GWTYPE:USER
FN:Quarshie, Alexander
EMAIL;WORK;PREF;NGW:[email protected]
N:Quarshie;Alexander
TITLE:Biostatistician
X-GWUSERID:aquarshi
END:VCARD




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