Date: Tue, 28 Sep 1999 14:41:48 GMT0BST
Reply-To: Panos PAPANIKOLAOU <PapanikolaouP@CARDIFF.AC.UK>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Panos PAPANIKOLAOU <PapanikolaouP@CARDIFF.AC.UK>
Subject: Re: make a new variable in excel
In-Reply-To: <4B3822B43D03D311A6050000F68ABFE720F849@DSHSBUDLAND>
Dear Mr Terjeson,
i working on excel but i a new user in this software.
i have two queries and i would appreciate if i would receive any
comments.
1. i have two date-variables, X and Y, in a mm/dd/yy format.
i want to create a new variable, say Z = X-Y.
would you like to give me any advice how to carry on, please.
I mean what sections should i look at the manuals and the on-line
help and how i would apply this stuff.
2. some of the values that of these variables take are of the last
century. That is, the values are like 08/25/1898.
what is the best way to deal with these values, please.
thank you very much indeed for taking the time to ocnsider my
request. I look forward to hearing from you.
Regards
Panos Papanikolaou
Research fellow
UWCM
Cardiff, CF4 4XN
U.K
> Hi Jim,
> In Excel dates are only valid when --
> Year is a number from 1900 to 9999 in Microsoft Excel for Windows
> or 1904 to 9999 in Microsoft Excel for the
> Macintosh.
>
> As you play with Excel you will notice that any date that you create
> which
> is "before" Jan 1, 1900 will not even let you apply any date formats to it,
> it is
> basically treated as a character string.
>
> HTH,
> Mark Terjeson
> Washington State Department of Social and Health Services
> Division of Research and Data Analysis (RDA)
> (360) 902-0741
> (360) 902-0705 fax
> mailto:terjemw@dshs.wa.gov
>
>
>
>
> > -----Original Message-----
> > From: Jim [SMTP:NoSpam@NOSPAM.COM]
> > Sent: Thursday, September 23, 1999 2:41 PM
> > To: SAS-L@LISTSERV.UGA.EDU
> > Subject: Reading Excel (xls) spreadsheet date fields
> >
> > NT 4.0, SP 5, SAS 7/8 for Windows. Reading an Excel spreadsheet with
> > several columns of data. All works fine except the date fields. They are
> > formatted as mm/dd/yyyy, some dates before Jan 1, 1900. SAS reads this
> > variable as text. Any ideas how to get it to read it as a date? Thanks.
> > Jim
|