Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: AW: tostring command


From   Rajaram Subramanian Potty <[email protected]>
To   [email protected]
Subject   Re: st: AW: tostring command
Date   Fri, 23 Apr 2010 15:41:58 +0530

Thank you very much for the quick reply and is very much helpful in
converting the numeric variable to string variable.

Thanks and regards,

RAJARAM. S

On Fri, Apr 23, 2010 at 3:20 PM, Martin Weiss <[email protected]> wrote:
>
> <>
>
> Either -force- it or supply your own -format-, with the latter option
> strongly perferred:
>
>
> *************
> clear*
> set obs 1
> gen double myvar=12345612345
> format myvar %11.0f
> l
> tostring myvar, generate(mystrvar) force
> tostring myvar, generate(mystrvar2) format(%11.0f)
> l
> *************
>
>
>
> HTH
> Martin
>
> -----Ursprüngliche Nachricht-----
> Von: [email protected]
> [mailto:[email protected]] Im Auftrag von Rajaram
> Subramanian Potty
> Gesendet: Freitag, 23. April 2010 11:31
> An: [email protected]
> Betreff: st: tostring command
>
> Dear all,
>
> When I am using the command "tostring" to convert numerical variable
> to string variable I am getting an error.
>
> The error is "indid cannot be converted reversibly; no generate".
>
>  This error comes only if the numerical varibale has 11 or more
> digits. Because of this not able to convert numerical variables with
> 11 or more digits to string variable. Can any one know the solution to
> convert the numerical variable to string variable even if the variable
> has 11 or more digits.
>
> Thanks and regards,
>
> RAJARAM. S
> *
> *   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/
>
>
> *
> *   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/
>

*
*   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/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index