[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: RE: reduce a variables numbers of digits to 4 counting from left
> I have a numeric variable of 9-12 digits, of wich only the
> first 4 digits counting from the left is of importance. I
> therefore have to get rid of the remaining 5-8 digits.
gen y = real(substr(string(x),1,4))
* For searches and help try: