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
Comparing two probit models with clustered standard errorsHey everyone, I would like to compare two probit models (that are nested) to see whether the additi…
Generating data according to a patternHello list, I am trying to generate data according to the following pattern: Obs A B C ------------…
Panel Data Analysis: Growth rates or levels?Hi Statalist-community! I am currently writing a seminar paper. I am estimating the effect of the s…
Marginsplots for different values of xHello, first post so apologies if something similar has been asked before. I'm investigating the rel…
Testing of adjusted Kaplan-Meier survivalHow to test for adjusted kaplan-meier survival analysis ? I am able to create adjusted KM graph but …
Subscribe to:
Post Comments (Atom)
0 Response to Convert string to time including milliseconds
Post a Comment