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...
Related Posts with Convert string to time including milliseconds
Trying Latex(failed) …
interpretation of interaction of two logged variables in log-log modelDear Stata Listers, Could one advise on how to claculate the marginal effect of one logged variable…
Heckman Panel DataHello everyone! I have small doubts regarding estimation of Heckman model in the panel data framewor…
extracting random effectsDear Stata users, I am wondering how to extract random effects after joint model (-stjm-). The f…
"Scaled RSS evaluates to missing" problemDear Stata users, I am running nlsur command to regress a system of 2 equations to exercise the Mis…
Subscribe to:
Post Comments (Atom)
0 Response to Convert string to time including milliseconds
Post a Comment