Date: Thu, 7 Mar 2002 09:23:11 -0500
Reply-To: kviel <kviel@GMCF.ORG>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: kviel <kviel@GMCF.ORG>
Subject: Re: character field to valid sas date
Content-Type: text/plain; charset="iso-8859-1"
Sharon,
To convert use input(date,yymmdd10.):
202 data _null_;
203 date="2001/01/19";
204 date2=input(date,yymmdd10.);
205 put date2= date2=yymmdd10.;
206 run;
date2=14994 date2=2001-01-19
Regards,
Kevin
Kevin Viel
Georgia Medical Care Foundation
57 Executive Park South, NE
suite 200
Atlanta, GA 30329-2224
-----Original Message-----
From: Sharon Alexander [mailto:hcc.ales@HCCSJ.NF.CA]
Sent: Thursday, March 07, 2002 9:09 AM
To: SAS-L@LISTSERV.UGA.EDU
Subject: character field to valid sas date
Hello everyone:
I have a perm sas data set which was originally exported from Excel 95.
All of the date varaibles in the data set are showing as character
variables with a length of 10. The format when printed is 2001/01/19.
I would like to use some of the fields in calculations. How do I
convert this type of format to a valid sas date?
Sharon
|