Hallo,
I have have a little problem and would be thankful if anyone could help me.
My dataset contains date in form of e.g. (19800229) and i want to extract the year (for this example 1980).
I already tried the command
gen fyear=year( fiscal_year_end)
but I just get missing values.
I think its because Stata can´t ready the format.
It would be great if anyone can help me.
Thanks in advance.
Best regards
Jana
Related Posts with Extract year from Date
How to calculate BMI using height & weightGood afternoon, I was wondering if any of you, STATA experts, could assist me and guide me in how t…
Coding 0,1,2 for political states in 2016Hi y'all I would be most grateful if anyone out there has written a simple code to categorize states…
how to perform a multivariate multilevel model with Stata? hello statalist I have a problem I would like to analyze independently the reading and mathematical…
egen or gen newvar to categorize the 50 states into Democrat, Republican, or Swing based on 2016 election resultsHi y'all I would be most grateful if anyone out there has written a simple code to categorize states…
Strange convergence properties using xtmlogitHi, I'm having some convergence troubles with xtmlogit (Stata 17). In trying to isolate exactly wha…
Subscribe to:
Post Comments (Atom)
0 Response to Extract year from Date
Post a Comment