I have a variable containing strings in the following format
StringVar
"2018-12-27 14:28:41.4861930"
I would like to convert it into a variable with a time format STATA will recognize, keeping the precision to the millisecond level. E.g. the # of milliseconds since 1960 would be perfect.
I tried among other things the following, but it delivered only missing values.
gen time2=clock(StringVar,"DMYhms")
Any ideas?
Thank you for the help...
0 Response to Convert string to time including milliseconds
Post a Comment