|
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!
|