I am completely new to Stata. I have imported a dataset of approximately 50 columns by 500,000 rows. About eight of the columns are dates in the format YMD , eg 2015-05-14. The dataset imports nicely but all of the dates are in red, I assume this means they are strings.
From the manual I have tried
generate eventdate = date(admidate, "YMD")
format eventdate %td
I am not sure if I am on the right track here, - I assumed that I need to convert the string to a date format that Stata understood?. This comment seems to go through but the data remains the same.
When I look at the date it is still red, – and when I look at the variable properties under format it says it is still %10s.
Can anyone get me on the right track please.
Related Posts with Import CSV dates
reformat (destring) var questionHi Hi, I am relatively new to stata and want to reformat a variable. the var is named p3_start_TS, …
Two-Stage Least Squares with cross-section weights and adjusted-R2Hi! I am currently analysing daily yield spreads of the euro-area countries over a 10-year period. I…
Interpreting margins results for a mlogit regression with variable of interest in logHello everyone This was a long title, but it summarizes well my issue. I ran a mlogit regression w…
Summing or combining duplicate observationsHello all, I would like to ask how to combine/sum up data from duplicate observations. In the below…
Double Sorting quantilesHello, I have got the following problem: I am trying to sort my variable into five quintiles and wit…
Subscribe to:
Post Comments (Atom)
0 Response to Import CSV dates
Post a Comment