Date: Thu, 29 Mar 2007 07:26:36 -0700
Reply-To: "ram.sasha@gmail.com" <ram.sasha@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "ram.sasha@gmail.com" <ram.sasha@GMAIL.COM>
Organization: http://groups.google.com
Subject: Re: How to drop rows based on a date based condition
In-Reply-To: <1175178160.049566.91700@o5g2000hsb.googlegroups.com>
Content-Type: text/plain; charset="us-ascii"
On Mar 29, 10:22 am, "RolandRB" <rolandbe...@hotmail.com> wrote:
> On 29 Mar, 16:16, "ram.sa...@gmail.com" <ram.sa...@gmail.com> wrote:
>
>
>
>
>
> > How to drop rows based on a date based condition?
>
> > dataset x
>
> > id date1 date2 cdate
> > 1 09MAR1999 26MAR1999 14MAR 1999
> > 2 11FEB1998 22FEB1998 04MAR1998
> > 2 21SEP1998 20OCT1998 09OCT1998
> > 3 18JUN1997 15JUL1997 22JUL1997
> > 3 15AUG1999 14SEP1999 10SEP1999
>
> > If Cdate doesnt fall between date1 and date2 then I need to drop
> > those rows.
>
> > want:
> > dataset y
>
> > id date1 date2 cdate
> > 1 09MAR1999 26MAR1999 14MAR 1999
> > 2 21SEP1998 20OCT1998 09OCT1998
> > 3 15AUG1999 14SEP1999 10SEP1999
>
> > Thanks,
>
> > Ram
>
> if not (date1 <= cdate <= date2) then delete;- Hide quoted text -
>
> - Show quoted text -
Thanks
|