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
How do I generate a risk score and then use it to calculate quartile odds ratioHello I was looking for some assistance in generating a prediction risk score for a binary outcome …
error message returned when installing spost13 using Stata 17Hello, I would like to use Brant test for my ordered logistic regression models and tried to instal…
Substracting different rows in StataHi all! I need your help, please! I have data from 2014q1 to 2019q4, what I want to do is subtract …
How to rewrite graph-like command that written by users under Stata 6.0 or earlierDear Stata users, Stata had changed its graph command since version 7. However there are a lot of c…
From single event observations to time seriesHi everyone, As I am quite new to Stata hope you can help me out with the next question. Currently…
Subscribe to:
Post Comments (Atom)
0 Response to Extracting year from Date variable
Post a Comment