Statalist


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

Re: st: Converting numbers in format (52,500) into numerical format


From   "Sergiy Radyakin" <[email protected]>
To   [email protected]
Subject   Re: st: Converting numbers in format (52,500) into numerical format
Date   Wed, 12 Sep 2007 13:30:46 +0200

Hello Dan,

I suggest you first read the file in having all your variables as strings.
Then replace "(" to "-"
        replace "," to "."
        replace ")" to "" (nothing)
with the help of subinstr() function
Then destring the variables.

Best regards, Sergiy

On 9/11/07, Rodriguez, Dan <[email protected]> wrote:
> Have comma-delimited file that I need to process daily in automated fashion. How can I convert numbers in parenthetical format into real numbers?
>
> ==============================================================================
> Please access the attached hyperlink for an important electronic communications disclaimer:
>
> http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html
> ==============================================================================
>
> *
> *   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/
>
*
*   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