I need to convert a numeric variable to string but add
leading zeros.
So a 4 needs to be converted to 004, a 40 to 040 and
400 to 400 (only upto 3 digits). I need to combine
this new string variable with another to make ids.
I tried
tostring hhpsu, f(%03s)
but that returns hhpsu as str1 and with all missing
values.
Thank you for your time and help.
-Ankur
__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com
*
* 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/