Hi everyone, I would like to ask some help in order to extract year from a string variable (year of incorporation) that is structured in this way: 12/9/1998.
I tried to encode the variable (year of incorporation), change the format in %td and then use the code year(year of incorporation) but Stata returns me a year that does not match with the one in the date. For example, for 12/9/1998 it returns 1970.
How can I solve the problem?
Thanks!
Related Posts with Extract Year from a string variable
Esttabl Table Header Edit: 2SLS stages with dependent variable (2 rows)I am using estab to get a regressions summary table as latex table. Here is my code. Code: #delim…
Surviving Firms in the SampleHi, I require some help with identifying the surviving firms that have survived completely over some…
an error occurred when bootstrap executed savemarginsHi, Using the code below, I have been able to obtain predicted probability at age=0 and SRH_B=0. Als…
Precision issue- if command doesn't select variable with requested valueshi all, I have a variable (crops_yield) with following kind of observations. The variable type is do…
Rolling Regression to Calculate Abnormal ReturnsHi there, I used the rolling regression with window 12 months to calculate expected Beta and then I …
Subscribe to:
Post Comments (Atom)
0 Response to Extract Year from a string variable
Post a Comment