Hi. This will likely be a banal and rudimentary question. Apologies in advance, but I am stuck nevertheless. To my own disgrace, I am not able to troubleshoot through help format.
I have a string variable imported from an excel file. This string variable is stored as str6 %9s. I need to format this variable such that:
1. There are 6 characters/digits for each observation
2. There is a decimal before the final two characters/digits, and after the first 4.
Current values for this variable, TOP, include:
130800
83700
10100
100810
However, I need these (and all other) values to take the following form:
1308.00
0867.00
0101.00
1008.10
Thanks in advance.
Related Posts with Formatting a String
Dealing with missing data after using business date for daily stock returnDear distinguished Prof, I have daily data on stock price of 15 companies, I want to calculate daily…
Avergaing values of variables to reduce survey observationsHi, I am looking for a solution to average the survey respones. Below S007 is suvey respondent ID, …
Something wrong with -colorpalette-Dear Stata users, I have installed the -colorpalette- wrote by Ben Jann, and I remenber that it run…
Stata for loop errorHi, I am trying to run the below loop in stata. But i get an error. Can someone help me. I am a be…
Interpreting significant interaction effect while main effect is insignificantHi! I am investigating the effect of balanced ambidexterity and combined ambidexterity on firm perf…
Subscribe to:
Post Comments (Atom)
0 Response to Formatting a String
Post a Comment