Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: dates


From   "Sebastian F. B�chte" <[email protected]>
To   [email protected]
Subject   Re: st: dates
Date   Sat, 18 Aug 2007 09:23:36 +0200

Peggy

I agree with Michael. From the variable descriptions you posted one
can see that the values of exitdate are somehow labeled. As Michael
suggested before you should try the following:

label list exitdate

//To get real dates you could do then:

decode exitdate, gen(str_exitdate)
label values exitdate
replace exitdate = date(str_exitdate,"mdy")
drop str_exitdate

..then you may perform you data replacement for the dates with
year(exitdate)==2006

Regards
Sebastian






On 8/17/07, Michael Blasnik <[email protected]> wrote:
> ...
> I think you misunderstand the problem, there appear to be no observations that
> meet the criteria  if year(exitdate)==2006
>
> M Blasnik
>
> ----- Original Message -----
> From: "Elizabeth Rainwater" <[email protected]>
> To: <[email protected]>
> Sent: Friday, August 17, 2007 5:29 PM
> Subject: Re: st: dates
>
>
> > Couldn't you just do
> >
> > replace exitdate=16801 if year(exitdate)==2006
> >
> > It works for me:
> > . format junk %dD_m_Y
> >
>
> *
> *   For searches and help try:
> *   http://www.stata.com/support/faqs/res/findit.html
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/
>
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index