LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (December 2008)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 1 Dec 2008 11:08:34 -0600
Reply-To:     "Peck, Jon" <peck@spss.com>
Sender:       "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:         "Peck, Jon" <peck@spss.com>
Subject:      Re: EXCEL DATES - error message
Comments: To: Ian Martin <ianmartin@mac.com>
In-Reply-To:  A<06530133-B5DD-4B33-93E9-08DC187EEA34@mac.com>
Content-Type: text/plain; charset="us-ascii"

The SPSS code knows about this Excel oddity. In fact, you can control what origin Excel uses even on Windows, so the SPSS code on both platforms has to deal with this.

Most likely, there is something in the Excel sheet that is causing SPSS to treat these values as plain numbers, not dates. Remember that a column in SPSS has to have a consistent format. Look for something in the Excel date column that is not actually a date.

HTH, Jon Peck

-----Original Message----- From: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU] On Behalf Of Ian Martin Sent: Monday, December 01, 2008 8:26 AM To: SPSSX-L@LISTSERV.UGA.EDU Subject: Re: [SPSSX-L] EXCEL DATES - error message

I haven't seen any mention of OS/platform in this thread, but thought it worth noting that mac and pc have different excel date representations. Mac is 1904 and pc is 1900, I think? I know I've had to deal with this when moving excel files with dates between these OSs. Perhaps it may also be an issue with bringing cross platform files into SPSS from excel?

regards, Ian.

Ian D. Martin, Ph.D.

Tsuji Laboratory University of Waterloo Dept. of Environment & Resource Studies

On 01 Dec, 2008, at 7:07 AM, Art Kendall wrote:

> go to variables view and see if Pbirthdate is a numeric field and > that you have spelled it correctly. > > > Art Kendall > Social Research Consultants > > > > Thara Vardhan wrote: >> Dear List Members >> >> Sometime back Lombardo, Barbara had asked for help with the following >> problem: >> >> >>> Would someone please tell me how to get Excel dates into SPSS. It >>> shows as a date in Excel, 05/06/1954 but comes into SPSS as 19849. >>> >> >> and I think it was Richard Ristow who provided the tested solution as >> >> NUMERIC SPSSDate (ADATE10) /* or any SPSS date format */. >> >> COMPUTE SPSSDate = DATE.MDY(01,01,1900) >> + TIME.DAYS(ExcelNum) >> - TIME.DAYS(1). >> LIST. >> >> I am experiencing the same problem in reading a date variable in SPSS >> version 17.0 from an Excel file. >> >> I have a date variable Pbirthdate in Excel (4/06/1985) which is >> reading as >> 31201in SPSS. >> >> I tried to apply the above syntax: >> >> But I am getting an error message: >> >> NUMERIC SPSSDate (ADATE10). >> COMPUTE SPSSDate = DATE.MDY(01,01,1900) >> + TIME.DAYS(Pbirthdate) >> - TIME.DAYS(1). >> >> >>> Error # 4310 in column 42. Text: ) >>> The numeric argument required for the function specified was not >>> >> supplied. >> >>> This command not executed. >>> >> execute. >> >> Can you please help me understand the error message? >> >> Any help is much appreciated. >> >> thanks >> regards >> Thara Vardhan >> Senior Statistician >> >> >> >> >> >> >> >> >> >> Thara Vardhan >> Senior Statistician >> Performance Improvement & Planning >> NSW Police >> Tel: (02) 8835-8526 >> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >> _ _ _ _ _ _ _ _ >> >> The information contained in this email is intended for the named >> recipient(s) >> only. It may contain private, confidential, copyright or legally >> privileged >> information. If you are not the intended recipient or you have >> received this >> email by mistake, please reply to the author and delete this email >> immediately. >> You must not copy, print, forward or distribute this email, nor >> place reliance >> on its contents. This email and any attachment have been virus >> scanned. However, >> you are requested to conduct a virus scan as well. No liability >> is accepted >> for any loss or damage resulting from a computer virus, or >> resulting from a delay >> or defect in transmission of this email or any attached file. This >> email does not >> constitute a representation by the NSW Police Force unless the >> author is legally >> entitled to do so. >> >> ===================== >> To manage your subscription to SPSSX-L, send a message to >> LISTSERV@LISTSERV.UGA.EDU (not to SPSSX-L), with no body text >> except the >> command. To leave the list, send the command >> SIGNOFF SPSSX-L >> For a list of commands to manage subscriptions, send the command >> INFO REFCARD >> >> >> > > ===================== > To manage your subscription to SPSSX-L, send a message to > LISTSERV@LISTSERV.UGA.EDU (not to SPSSX-L), with no body text > except the > command. To leave the list, send the command > SIGNOFF SPSSX-L > For a list of commands to manage subscriptions, send the command > INFO REFCARD

===================== To manage your subscription to SPSSX-L, send a message to LISTSERV@LISTSERV.UGA.EDU (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD

===================== To manage your subscription to SPSSX-L, send a message to LISTSERV@LISTSERV.UGA.EDU (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD


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