Dear all,
I am very new to Stata.
I want to convert the numeric date variable "cdint" (type: long, format: %tdD_m_Y) to a string variable.
It currently looks like that: cdint
25 Jan 07
29 Jan 07
13 Jan 07
29 Jan 07
04 Feb 07
24 Jan 07
01 Feb 07
13 Jan 07
26 Jan 07
21 Jan 07
25 Jan 07
13 Jan 07
15 Jan 07
14 Jan 07
12 Jan 07
23 Jan 07
05 Feb 07
27 Jan 07
27 Jan 07
13 Jan 07
12 Jan 07
I tried to destring it and use the date command but Stata always generates missing values.
destring cdint, replace
gen date = date(cdint, "DMY")
(3,176 missing values generated)
Related Posts with Converting numeric date variable to string variable
Error: Option Dynamic Not Allowed in the Command PredictHi, I am doing ex-ante out of sample forecasting for rail freight. Based on the results of the ADF …
"Outcome does not vary" errorHi everyone I am trying to run a logit regression: logit employed firmsize and I receive this erro…
Need help on the Margins and marginsplotDear experts, I am a beginner of Stata and I need your help desperately. I have the panel data from…
Line graphsHi STATALIST, Using line cp50_CTDI cp50_CTDI_withIR cp50_CTDI_withoutIR p50_CTDI I produced …
How to do tabstat varlist with all variablesDear Stata users, I have data with long variable names. When I want to use "summarize", it abbrevia…
Subscribe to:
Post Comments (Atom)
0 Response to Converting numeric date variable to string variable
Post a Comment