Quantcast
Channel: Statalist
Viewing all articles
Browse latest Browse all 73275

Converting string to numeric

$
0
0
Hey all,
I have imported a csv file into Stata that contains a date variable formatted as a string variable in the form, DD/MM/YY. I want to convert this variable to numeric in order to apply date functions and ultimately perform time series analysis, can someone please provide the commands to do this. I tried the command, "destring date, replace", and received an error message. Also, I tried converting the variable to numeric in the data editor but in doing so the data seemed to end up corrupted and null values were returned.

Thanks,
Andrew

Viewing all articles
Browse latest Browse all 73275

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>