Date:  Thu, 15 Jul 2004 14:10:25 0400 
ReplyTo:  Sigurd Hermansen <HERMANS1@WESTAT.COM> 
Sender:  "SAS(r) Discussion" <SASL@LISTSERV.UGA.EDU> 
From:  Sigurd Hermansen <HERMANS1@WESTAT.COM> 
Subject:  Re: About DBMS/COPY 

ContentType:  text/plain 

William:
I should qualify my reply. I am assuming that the SAS variable with value of
19600102 has a numeric type, and that you want to calibrate the values of
that variable around the SAS origin date of '01/01/1960'. Obviously, you
could do that by subtracting 19600101 from each value. The solution I
suggested uses a format and informat instead to construct arguments for the
PUT() and INPUT() functions. Conversion functions and informats/formats
allow more flexibility.
For a character value dat='19600102', use the INPUT statement only to use a
SAS informat to convert a character representation of a date to a number
that, in SAS, maps to that 01/02/1960. You will also need to use an format
to display the SAS date value as a properly formatted date value.
Sig
Original Message
From: SAS(r) Discussion [mailto:SASL@LISTSERV.UGA.EDU] On Behalf Of william
Sent: Thursday, July 15, 2004 12:22 PM
To: SASL@LISTSERV.UGA.EDU
Subject: About DBMS/COPY
Hi,there
I try to convert STATA dataset to SAS v8.2.Anything looks ok except date
data.For example,In SAS ,if date is 19600102,It should store as 1.But after
I transfer it from STATA,I found the 19600102 is saved as same as STATA.It
is 19600102 instead of 2.So,how can I transfer it to SAS type. Thanks
