Hi everyone,
I am having troubles extracting the year from my dateset. Some observations have the formal d/m/y, while others have only the year.
I tried the following
encode Acquirordateofincorporation, gen(Age)
generate AcquirorAge = yofd(Age)
gen AGE=(2021-AcquirorAge)
I also tried gen Year=real(substr(Acquirordateofincorporation)), but it doesnt work.
Any help would be highly valuable.
Thank You!
Iulia
Related Posts with extract the year from an inconsistent string date variable
Duplicate DataHello, I'm trying to find a more concise/efficient way to identify duplicate data. It's not as stra…
Outreg2 for Likelihood Ratio Test (LR Test) ResultsHi all, I have been trying to send the Likelihood Ratio Test (LR Test) Results to MS Excel but fail…
Insignificant Variables and CollinearityHello! I am having some troubles with a particular regression. I have data from the labour force su…
Interpretation of margins after ProbitI am running a probit model of math proficiency (proficient or not) on education expenditure (rupees…
confidence intervals in mixlogit user written commandHello Does any know whether confidence intervals in -mixlogit- are calculated via Krinsky and Robb o…
Subscribe to:
Post Comments (Atom)
0 Response to extract the year from an inconsistent string date variable
Post a Comment