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
putpdf image errorAfter a logit, I am doing Code: lroc graph export "$charts\roc_y_1_x_`k'.png", replace putpdf imag…
Empty cells in some imputations of multiply imputed dataI have a data set that some colleagues and I need to do a survival analysis on. The outcome is time …
Probably beginner question: How to format monthly datesHi there, I am new to Stata and I started last week as a total newbie. What I want to do is to che…
Where STATA is storing the loading factors ( Factor analysis using GSEM)Hi guys, I used "gsem" commend and "predict, latent" to estimate factor scores and the factors scor…
Do I need to add main effect in a regression model with a Difference value between two variables?Hi, Here is my regression model: regress y x1 x2 x3_x4; /* x3_x4 = x3 - x4 */ Do I need to add x3…
Subscribe to:
Post Comments (Atom)
0 Response to Converting numeric date variable to string variable
Post a Comment