But re-formatting alone will not make extraction of the first three
digits any easier.
Nick
[email protected]
Martin Weiss
See http://www.stata.com/support/faqs/data/leading0.html
Ekaterina Hertog
1) I have got a variable consisting of 7 digit zipcodes. I want to
create a second variable which will only consist of the first 3 digits
of each zip-code and I cannot find a way to do it.
2) Some of the zipcodes start with 00, e.g 0037845 and Stata drops the
front 00 turning such zipcodes into 5-digit numbers (e.g. 37845). I need
to make Stata understand that these 00 are meaningful and return them
back into the zipcodes and I cannot find how to do this. They were
present in my original csv file, but when I converted it into a Stata
file using Stattransfer they were gone.
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/