| Date: | Thu, 3 Feb 2005 18:28:51 -0500 |
| Reply-To: | Richard Ristow <wrristow@mindspring.com> |
| Sender: | "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU> |
| From: | Richard Ristow <wrristow@mindspring.com> |
| Subject: | Re: Transferring time data from excel |
|
| In-Reply-To: | <7277d4727e50.727e507277d4@du.edu> |
| Content-Type: | text/plain; charset="us-ascii"; format=flowed |
|---|
At 10:01 PM 2/2/2005, Michelle Marie Hartman wrote:
>I am working on some data in Excel that is in time format hh:mm. Many
>of these times are over 24 hours (e.g. 45:15). I need to transfer
>this data into SPSS, and so far have been unable to do so. SPSS will
>recognize anything under 24 hours, but nothing over.
I'm afraid my software versions are so elderly that I can't do a
meaningful test.
But, when you transfer an Excel cell with a time over 24 hours, what do
you get? System-missing? A ridiculous value? A very large number that
makes no sense?
What format are you using for the transferred variable? If you're
getting some values, but they aren't making sense, try format
DATETIME20 and see what it looks like.
I write this, because often Excel times are transferred to SPSS as
date-time values starting at midnight, 30 December 1899. (Don't ask.)
For example, from recent thread "Excel 2003 to SPSS 12.0 or reformat a
datetime var",
>The variable is formatted in Excel as "12:00 AM." But when imported
>into SPSS, SPSS reformats and/or display's this variable as
>"30-DEC-1899 12:00:00."
If that's what you're getting, try
COMPUTE TIME_VAR = TIME_VAR - DATE.DMY(30,12,1899).
Alternatively: Excel time variables are in days. If you format the
Excel column as a number, rather than a date, and import it as, say,
TIME_NUM, you can make it an SPSS time variable by
COMPUTE TIME_VAR = TIME.DAYS(TIME_NUM).
|