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 (March 2006, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Mon, 6 Mar 2006 17:50:05 -0800
Reply-To:   David L Cassell <davidlcassell@MSN.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   David L Cassell <davidlcassell@MSN.COM>
Subject:   Re: Date, year, and month
In-Reply-To:   <200603061410.k26BlmiH000438@malibu.cc.uga.edu>
Content-Type:   text/plain; format=flowed

carf4F@GMAIL.COM wrote: >I wish to have from > >date >19251213 > >to > >date2 >25-12 > >I know year and date function, but || produced > >Obs DATE date2 > > 1 19251231 1925 12

I see that you have received a lot of help already. But let me lob in my thoughts.

First, you will always have troubles lurking until you start storing your dates as SAS date variables. Then you can *display* using any date format that you like, whenever you like.

Second, your problem above looks like you saved things as intermediate character variables and then concatenated them, forgetting that there are fixed lengths, padded on the right with blanks. Or (worse) you stored things in macro variables first, then concatenated them. You'll want to learn about character variables in SAS, and then you'll realize that dates should defintiely be in SAS date variables.

HTH, David -- David L. Cassell mathematical statistician Design Pathways 3115 NW Norwood Pl. Corvallis OR 97330

_________________________________________________________________ Express yourself instantly with MSN Messenger! Download today - it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/


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