I have variable shrcd, which is a two digit code but it show's value 1.1e+01, When I click on values in editable mode it shows two digits as shown in picture.
As its a two digit code I want to get first value of this variable so I applied substr command(gen aa=substr(shrcd,1,1) as shown in picture. it shows type mismatch, I even tried (gen aa=real(substr(shrcd,1,1)) but it shows the same msg.
So I have two questions here why it is showing values like 1.1e+01?
How to apply substr command in this situation? Thanking in anticipation.
As its a two digit code I want to get first value of this variable so I applied substr command(gen aa=substr(shrcd,1,1) as shown in picture. it shows type mismatch, I even tried (gen aa=real(substr(shrcd,1,1)) but it shows the same msg.
So I have two questions here why it is showing values like 1.1e+01?
How to apply substr command in this situation? Thanking in anticipation.
Comment