Hi all,
I want extract year from a date variable. No sure how to do this. Appreciate your assistance in advance.
Describe date
storage display value
variable name type format label variable label
------------------------------------------------------------------------------
date long %10.0g DATE_Birth
Date in the stata file look like this.
date
26112007
5072007
4032008
7032008
7042008
30012008
25072007
19122007
14092007
10122007
7112007
8112007
20122007
Thanks,
Related Posts with Extracting year from Date variable
Request for help- interpreting results post margins.Hello everyone, I am using probit model in Stata 16.1 to identify [dependent var] whether a firm ch…
Generate variable to subtract current value from previous valueHello. I am working with the NYT COVID-19 data. The data presents two years worth of COVID-19 case a…
arellano-bover/blundell-bondHello people, I have a panel data of 9 firms for a period of 11 years with no missing data. In 2017,…
separate regression of subgroupsHope you are enjoying the coziness of the weekend or early Monday already!. I have a data set with t…
State-of-the-art weighting methods when analyzing multiple surveys at the same timeDear Statalist: This is a bit of a longshot, but I was wondering if anyone had good references for …
Subscribe to:
Post Comments (Atom)
0 Response to Extracting year from Date variable
Post a Comment