Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Re: Re: st: binary indicator for differing subsets of variables [SEC=UNCLASSIFIED]


From   Nick Cox <njcoxstata@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: Re: Re: st: binary indicator for differing subsets of variables [SEC=UNCLASSIFIED]
Date   Fri, 9 Sep 2011 08:26:50 +0100

Quite right. I just realised this as I woke up! Sorry.

You'd need to convert to numeric dates.

Nick

On Fri, Sep 9, 2011 at 3:09 AM, Fry, Jane <Jane.Fry@pc.gov.au> wrote:
> Hmmm... but if my date variables are strings (MMYY)
> would the inrange function take the range to be alphanumeric and
> evaluated from left to right?
>
> e.g. inrange("`v'", date1, date2) for date1="0108" and date2="0708"
> would declare "0707" to be in the range?
>
> This would be a problem, but the blunt solution of generating the
> intervening dates would avoid it.
>
>
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index