Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Truncating data


From   Jake Herb <[email protected]>
To   [email protected]
Subject   st: Truncating data
Date   Wed, 8 Sep 2004 13:05:35 -0700 (PDT)

Hi,
I'd like to create a new variable that contains only
the first two digits of the numbers that an existing
variable contains.
For instance, the first 2 observations in x1 are:
6566
3478
I'd like the first 2 observation in a new variable x2
to be:
65
34
How do I do that?
Thanks for your help!
Jake




__________________________________
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
http://promotions.yahoo.com/new_mail
*
*   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