Date: Mon, 29 Aug 2005 11:43:00 -0400
Reply-To: Talbot Michael Katz <topkatz@MSN.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Talbot Michael Katz <topkatz@MSN.COM>
Subject: Re: Convert Infile Date to SAS Date
It looks to me like you are attempting to read a Julian date? SAS can
read Julian dates directly, using the JULIANw. informat, but the "/"
character gets in the way. One of the SAS-L wizards may have a cool way
to read it in one fell swoop, but here is a two-step kluge, reading in the
date as a character string, then stripping out the "/" and converting to
input jdat0 $8.; * read in as character;
cdate = input(compress(jdat0,"/"),julian7.); * strip out slash and
convert to Julian;
Hope this helps!
-- TMK --
"The Macro Klutz"
On Mon, 29 Aug 2005 11:00:03 -0400, Srna, Carol (C.) <csrna@FORD.COM>
>The Input file:
>CC 96 - 103
> 2004/237 This is how the date is in the input file
>I input the date as CDATE DATE8. in my SAS file;
>SAS tells me this is invalid data for the var. CDATE.
>What am I missing here?
>Thanks In Advance