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 (February 2000, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 16 Feb 2000 09:05:45 -0800
Reply-To:     "William W. Viergever" <wwvierg@IBM.NET>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "William W. Viergever" <wwvierg@IBM.NET>
Subject:      Re: Reading dates from Excel97 (DDE)
Comments: To: neil.white@bigfoot.com
In-Reply-To:  <38AA9557.C7BD2B2D@powerup.com.au>
Content-Type: text/plain; charset="us-ascii"

The way I do it is to make sure that in Excel the dates are formatted as "dates" with the mm/dd/yyyy "format".

If so then try the following:

filename tab1 dde "excel|f:\data\excel\[EXAMPLE.XLS]Sheet1!r1c1:r26c5" notab lrecl=1024;

data tmp01 ; *-- NOTE: my Excel file has 3 rows of column header stuff ; infile tab1 dlm='09'x dsd truncover firstobs = 4 ; input client : $75. provno : $9. fy_beg : ?? mmddyy10. fy_end : ?? mmddyy10. chk_dt : ?? mmddyy10. ; format fy_beg fy_end chk_dt mmddyy10. ;

At 10:17 PM 02/16/2000 +1000, Neil White wrote: >How do I read dates using DDE from an Excel 97 worksheet. > >I can read other types, but all I get is invalid data when I try to read >a date. > >The dates are Excel date format. I gather that the informat is >datetime18. but this doesn't seem to help > >any thoughts, code examples... > > >Ta > >Neil > >Dr Neil White >CRC Tropical Plant Protection >The University of Queensland >Australia >n.white@tpp.uq.edu.au >*****************************

---------------------------------------------------------------------------- William W. Viergever Voice : (916) 483-8398 Viergever & Associates Fax : (916) 483-8399 A SAS Institute Quality Partner (USA) E-mail : wwvierg@ibm.net Sacramento, CA 95825

"Time flies like an arrow. Fruit flies like a banana." - Groucho Marx ----------------------------------------------------------------------------


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