Hi all,
The data are as above.
However, ideally, I would want:
So there has to be a "-" after the two first digits, and a "." before the two last digits everywhere, i.e. for all observations.
In this variable, some observations are already correctly specified, e.g. 53-5011.00, and some are not, e.g. 53501100.
How can I add "-" and "." where they should be, wherever applicable?
Code:
input str11 onetSocCode "53-5011.00" "53.5011.00" "53501100" "53501100" "11-2021.00" "11202100"
However, ideally, I would want:
Code:
"53-5011.00" "53-5011.00" "53-5011.00" "53-5011.00" "11-2021.00" "11-2021.00"
In this variable, some observations are already correctly specified, e.g. 53-5011.00, and some are not, e.g. 53501100.
How can I add "-" and "." where they should be, wherever applicable?
Comment