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

st: RE: destring, keeping leading zeros

From   "David Harrison" <[email protected]>
To   <[email protected]>
Subject   st: RE: destring, keeping leading zeros
Date   Tue, 5 Jul 2005 15:35:39 +0100

123 and 0123 are the same number. You can never make the variable numeric and "keep them distinct" - if the distinction is important, then they are not numbers, they are codes and the string format is the correct one.


-----Original Message-----
From: Nawar, Eric [mailto:[email protected]]
Sent: 05 July 2005 15:00
To: [email protected]
Subject: st: destring, keeping leading zeros

I have a string variable which has the following distinct codes:


I want to make the variable numeric, but I want to keep the leading zero
on the first code to keep them distinct.  A suggestion to a similar
posting was to format with leading zeros - but this would make both
codes "0123".


*   For searches and help try:

*   For searches and help try:

© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index