I want to split middle 2 digits from a numeric var, which have 11 / 18 digits. For 11 digits, I want to keep 3,4 digits; for 18 digits, keep 9,10 digits.
I tried to tostring it and use substr, but it didn't work, read: IMAGE_NUM cannot be converted reversibly; no replace
Any possible way to do it? Many thanks!
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input double IMAGE_NUM 13940240545 13940240558 13940240558 13961253786 13961253786 13961253786 13961253787 13961253797 13961253797 13961253798 201510149002872670 201510149002872670 201510149002872670 201510149002872670 201510149002872670 201510149002872670 end
0 Response to Split 2 digits from a numeric var
Post a Comment