Bookmark and Share

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

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

st: AW: tostring command

From   "Martin Weiss" <>
To   <>
Subject   st: AW: tostring command
Date   Fri, 23 Apr 2010 11:50:27 +0200


Either -force- it or supply your own -format-, with the latter option
strongly perferred:

set obs 1
gen double myvar=12345612345
format myvar %11.0f
tostring myvar, generate(mystrvar) force
tostring myvar, generate(mystrvar2) format(%11.0f)


-----Ursprüngliche Nachricht-----
[] Im Auftrag von Rajaram
Subramanian Potty
Gesendet: Freitag, 23. April 2010 11:31
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,

*   For searches and help try:

*   For searches and help try:

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