LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (July 2004, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Thu, 15 Jul 2004 14:10:25 -0400
Reply-To:   Sigurd Hermansen <HERMANS1@WESTAT.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Sigurd Hermansen <HERMANS1@WESTAT.COM>
Subject:   Re: About DBMS/COPY
Comments:   To: william <smartie_zhuo@HOTMAIL.COM>
Content-Type:   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:SAS-L@LISTSERV.UGA.EDU] On Behalf Of william Sent: Thursday, July 15, 2004 12:22 PM To: SAS-L@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


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