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

st: destring, keeping leading zeros


From   "Nawar, Eric" <[email protected]>
To   <[email protected]>
Subject   st: destring, keeping leading zeros
Date   Tue, 5 Jul 2005 09:59:59 -0400

I have a string variable which has the following distinct codes:

0123
123

I want to make the variable numeric, but I want to keep the leading zero
on the first code to keep them distinct.  A suggestion to a similar
posting was to format with leading zeros - but this would make both
codes "0123".

Thanks,
Eric

*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index