Date: Mon, 5 May 2008 18:54:50 -0700
Reply-To: Tree Frog <tree.frog2@HOTMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Tree Frog <tree.frog2@HOTMAIL.COM>
Organization: http://groups.google.com
Subject: Re: having problem to read 2008 year?????
Content-Type: text/plain; charset=ISO-8859-1
Hello
First, your input statement specifies the wrong column to start
reading the dates (should be @6 and @20).
Second, your informat for reading the dates should be MMDDYY10.
Tree Frog
On May 6, 11:00 am, Miral <chok...@gmail.com> wrote:
> options yearcutoff= 1920;
> data hosp ;
> input @1 ID 2.
> @5 ADMIT MMDDYY8.
> @19 DISCHRG MMDDYY8.
> @30 COST dollar8.;
> format admit dischrg mmddyy10. cost dollar8.;
> datalines;
> 78 03/23/2008 03/27/2008 12345
> 68 03/21/2008 03/24/2008 22345
> 98 04/23/2008 04/27/2008 42345
> 75 05/23/2008 05/27/2008 52345
> 56 03/02/2008 03/17/2008 62345
> 90 02/23/2008 02/27/2008 82345
> 45 04/23/2008 04/26/2008 72345
> 53 01/23/2008 01/27/2008 92345
> 67 03/23/2008 03/28/2008 11345
> ;
> run;
>
> But when I run this program, instead of 03/23/2008, I am getting
> 03/23/2002
> Can somebody explain why, and give me the solution.
>
> Any help or suggestion is appreciated.
|