I have a simple table. Column 1 is a string variable.
I would like a want table where column 2 is a date in a DATE9. format. We assume that it is the end of the month. I have some sample code but do not know what to do after that.
Could you please help.
Column1 |
DEC16 Estimates reflect adoption |
Mar17 Estimates reflect adoption |
JUN15 Estimates reflect adoption |
SEP17 Estimates reflect adoption |
Could you please help.
Column1 | Column 2 |
DEC16 Estimates reflect adoption | 12/31/2016 |
Mar17 Estimates reflect adoption | 3/31/2017 |
JUN15 Estimates reflect adoption | 6/30/2015 |
SEP17 Estimates reflect adoption | 9/30/2017 |
Code:
gen str Column2= substr(Column1,1,5) generate str2 dxyr1= substr(Column2,4,5) generate str3 dxmo1 = substr(Column2,1,3)
Comment