LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (July 2007, week 5)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
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
Comments: To: sas-l@uga.edu
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


Back to: Top of message | Previous page | Main SAS-L page