Hello everybody,
how can I separate the date from the time ?
Name of the variable is created_at.
2014-10-22T19:13:48Z
I tried this code:
gen ddate = daily(substr(created_at, 1, 10), "YMD")
gen double ctime = clock(substr(created_at, 12, 12), "hms")
but I only got an output for date and not for the time.
Thanks.
Related Posts with separate time and date
sts graph risktable order errorAll, I'm getting an error re-labeling the risktable variables. I've searched for solutions and have…
Marginal effects after IVprobit is same as the IVprobit regression coefficientDear Statalist Users, I am hoping for some insight into the issue that I am facing. I am using IVP…
Linear Lasso Regressions and Stata's "lasso linear" CommandHi, I have a methodological question concerning lasso regressions and the lasso linear command in S…
Importing fixed width text dataHello, I am importing fixed width text data in stata using, for example, the following command infix…
What does " Set the active IRF file" mean?Dear all, In calculating the Impulse response functions I type in irf create irf, set(myname) I am…
Subscribe to:
Post Comments (Atom)
0 Response to separate time and date
Post a Comment