LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (November 2007, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Wed, 14 Nov 2007 12:26:38 -0800
Reply-To:   "Schwarz, Barry A" <barry.a.schwarz@BOEING.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   "Schwarz, Barry A" <barry.a.schwarz@BOEING.COM>
Subject:   Re: Help with the date, please?
In-Reply-To:   <200711141055.lAE8qHf5022476@mailgw.cc.uga.edu>
Content-Type:   text/plain; charset="us-ascii"

But date. would still default to date7. which would produce a value in 2020, not in 2006 as desired.

-----Original Message----- From: Gerhard Hellriegel [mailto:snip] Sent: Wednesday, November 14, 2007 2:56 AM To: SAS-L@LISTSERV.UGA.EDU Subject: Re: Help with the date, please?

what you can also do is using the colon operator:

input ..... c : date.;

Gerhard

On Tue, 13 Nov 2007 15:01:08 -0800, Schwarz, Barry A <snip> wrote:

>c is misaligned with respect to your format. > >date. defaults to date7. which is also wrong for your data. > >-----Original Message----- >From: Vladimir Grechko [mailto:snip] >Sent: Tuesday, November 13, 2007 12:00 PM >To: SAS-L@LISTSERV.UGA.EDU >Subject: Help with the date, please? > >The following code: > >options yearcutoff=1920 nocenter; >data d; > format b c date9.; > input a :$10. b date9. c date.; >cards; >26-Oct-06 26-Oct-06 26Oct2006 >; >proc print noobs; > var a b c; >run; > >... produces the following output: > a b c >26-Oct-06 26OCT2006 26OCT2002 > >Not sure how did I get 2002 in variable c and what should be done to >have the correct value. > >I will greatly appreciate your help!


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