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
What miss option means in gunique ?Deat Stata user, I found this gunique function, and using the same variable list I got different tot…
CI Decmposition Results not Showing percentage contributionHi All, I am using Stata 16 and trying to decompose the concentration index but the results show no…
synth_runner automatically generated predictorvarsI am using synth_runner in STATA 17. I got the exact same results when I run two specifications. dep…
Extract country names from affiliationsHi, I have a dataset of about 1000 articles with variables such as id, title, abstract and affiliat…
Flexible case-control matching commandHello, First, thanks in advance for anyone who can help me with this. I haven't had much luck recen…
Subscribe to:
Post Comments (Atom)
0 Response to Convert string to time including milliseconds
Post a Comment