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]

st: RE: ad a ZERO to the front for a string variable


From   Nick Cox <[email protected]>
To   "'[email protected]'" <[email protected]>
Subject   st: RE: ad a ZERO to the front for a string variable
Date   Fri, 16 Dec 2011 13:06:51 +0000

It's just another character. 

replace mystrvar = "0" + mystrvar 

Nick 
[email protected] 


-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Lars Folkestad
Sent: 16 December 2011 12:59
To: [email protected]
Subject: st: ad a ZERO to the front for a string variable

Dear List
How do i add a ZERO (0) to the front of a string variable?
lars

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