Date: Tue, 31 Jul 2007 08:21:03 -0000
Reply-To: Pralay <pralayhazra@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Pralay <pralayhazra@GMAIL.COM>
Organization: http://groups.google.com
Subject: Re: Sort character variales
In-Reply-To: <1185858943.547758.173590@j4g2000prf.googlegroups.com>
Content-Type: text/plain; charset="us-ascii"
On Jul 31, 10:15 am, Night_listener <ytste...@gmail.com> wrote:
> Hi, guys
>
> I have a character variale "date" representing "year/mth", as
> following
>
> "2006/02"
> "2006/03"
> .
> .
> .
> "2007/07"
>
> If I only need the obs after Dec/2006, can I use such a where-clause
> as " where date > "2006/12" "?
>
> Thanks
>
> Liang
Hello Liang,
Another solution is to create two variables out of that date
variable.
Year=input(substr(date,1,4),best12.);
Month=input(substr(date,5,2),best12.);
and then use where clause.
where year > 2006;
Hope this will work!
Cheers,
Pralay
|