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
Lagged treatment effect in DD model with multiple treatment periodsDear All, I have a question about how to include lagged treatment effect in a Difference-in-Differen…
panel data and time variable formatHello, I have a dataset and i need to define quarterly time variable and declare data to be a panel…
teffects model selection; AIPW coefficient interpretationI have two questions regarding methods for a pending project: I will have an outcome "yscale" that …
combomarginsplot with mimrgnsHi everyone, Does anyone know how to use combomarginsplot with margins derived from the mimrgns com…
error message in xtglsWhen I ran the xtgls regression: Code: xtgls dep var, covariate 1 covariate 2 .....covariate n, cor…
Subscribe to:
Post Comments (Atom)
0 Response to separate time and date
Post a Comment