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
Identify life events in panel dataHi Statalist. I would like to be able to identify life events within a panel dataset with multiple w…
How to match two datasets with constraints?Hello, This is my first time posting on this forum so thank you to everyone in advance. The simple…
How to remove " and "?Dear All, I have this dataset: Code: * Example generated by -dataex-. To install: ssc install datae…
Formatting Several Variables using a Loop Hello I have several variables (68) consisting of strings, integers, and floats. I am trying to for…
How to resolve numeric overflow while performing xtlogit,fe in stata?Dear all, Apologies if this question seems to be a repetition of a previous question. I had made som…
Subscribe to:
Post Comments (Atom)
0 Response to Extract year from Date
Post a Comment