Question about dates

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Question about dates

Doyle, Jennifer
Question about dates

I have 2 date fields in Excel, and I want to look at the length of time between the 2 dates -- I thought I could simply subtract the first from the second, but that's not working.. ..Does anyone have suggestions for how to accomplish this in either Excel or SPSS? Many thanks!

Jennifer

Jennifer Doyle, M.A.
Director of Surgical Education
Massachusetts General Hospital
Lecturer on Surgery, Harvard Medical School
55 Parkman Street - WAC 455Q
Boston, MA 02114
Phone:  617-643-8731
Fax:       617-724-0405
[hidden email]


I'm not an outlier; I just haven't found my distribution yet! -- Ronan M. Conroy, Lecturer in Biostatistics, Royal College of Surgeons of Ireland

Believe those who are seeking the truth, Doubt those who find it. -- Andre Gide

 The information transmitted in this email is intended only for the person or entity to which it is addressed. It may contain privileged or confidential material. Any review, retransmission, dissemination, or other use of this information by other than the intended recipient is prohibited. If you receive this email in error, please contact the sender and delete the material from any computer.

The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.

Reply | Threaded
Open this post in threaded view
|

Re: Question about dates

J. R. Carroll
Jennifer,

Even though this isn't an Excel listserv, I'll still answer in terms of Excel.  Perhaps one of the other listers can provide the appropriate purist-SPSS response.

In Excel, if you put in the date, for example cell A1 = 1/2/2012 and put an alternate date in another cell, lets say B1 = 1/5/2012.  You /should/ be able to tell Excel (in an adjacent cell) =B1-A1 and it should return the amount of days in between.

If this is not working for you, I'd recommend looking at your version of Excel and see if you can upgrade if possible.  Else, go with a pure Python or SPSS solution (of which I'd be happy to assist with if Excel isn't working).  Just make sure your "date cells" are formatted as "date" and not "numeric" or "string" or some other type before you do this.

If you insist on working with Excel I'll respond off-list and would be happy to help you troubleshoot what's going on, but the proposed solution for working with date ranges in Excel (if done correctly) should work for you.

HTH,


----


'J.' R. Carroll
Psychometrician
Comira
Computer Assisted Testing Service (CATS) Inc.
Phone 800-947-4228 x244
Fax 650-692-9307




On Mon, Apr 23, 2012 at 11:45 AM, Doyle, Jennifer <[hidden email]> wrote:

I have 2 date fields in Excel, and I want to look at the length of time between the 2 dates -- I thought I could simply subtract the first from the second, but that's not working.. ..Does anyone have suggestions for how to accomplish this in either Excel or SPSS? Many thanks!

Jennifer

Jennifer Doyle, M.A.
Director of Surgical Education
Massachusetts General Hospital
Lecturer on Surgery, Harvard Medical School
55 Parkman Street - WAC 455Q
Boston, MA 02114
Phone:  <a href="tel:617-643-8731" value="+16176438731" target="_blank">617-643-8731
Fax:       <a href="tel:617-724-0405" value="+16177240405" target="_blank">617-724-0405
[hidden email]


I'm not an outlier; I just haven't found my distribution yet! -- Ronan M. Conroy, Lecturer in Biostatistics, Royal College of Surgeons of Ireland

Believe those who are seeking the truth, Doubt those who find it. -- Andre Gide

 The information transmitted in this email is intended only for the person or entity to which it is addressed. It may contain privileged or confidential material. Any review, retransmission, dissemination, or other use of this information by other than the intended recipient is prohibited. If you receive this email in error, please contact the sender and delete the material from any computer.

The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.


Reply | Threaded
Open this post in threaded view
|

Re: Question about dates

parisec
In reply to this post by Doyle, Jennifer
Question about dates
In excel, i can:
 
Date2-Date1
 
So if:
 
Date2 = March 15, 2012
Date1 = January 15, 2012
 
I get 60 days.
 
What happens when you try this?
 
 
 

From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Doyle, Jennifer
Sent: Monday, April 23, 2012 11:45 AM
To: [hidden email]
Subject: Question about dates

I have 2 date fields in Excel, and I want to look at the length of time between the 2 dates -- I thought I could simply subtract the first from the second, but that's not working.. ..Does anyone have suggestions for how to accomplish this in either Excel or SPSS? Many thanks!

Jennifer

Jennifer Doyle, M.A.
Director of Surgical Education
Massachusetts General Hospital
Lecturer on Surgery, Harvard Medical School
55 Parkman Street - WAC 455Q
Boston, MA 02114
Phone:  617-643-8731
Fax:       617-724-0405
[hidden email]


I'm not an outlier; I just haven't found my distribution yet! -- Ronan M. Conroy, Lecturer in Biostatistics, Royal College of Surgeons of Ireland

Believe those who are seeking the truth, Doubt those who find it. -- Andre Gide

 The information transmitted in this email is intended only for the person or entity to which it is addressed. It may contain privileged or confidential material. Any review, retransmission, dissemination, or other use of this information by other than the intended recipient is prohibited. If you receive this email in error, please contact the sender and delete the material from any computer.

The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.

Reply | Threaded
Open this post in threaded view
|

Re: Question about dates

Doyle, Jennifer
Question about dates
it works now -- I think the date formatting was funky -- had imported data from a report in New Innovations, our evaluation tracking tool -- many thanks!
 

Jennifer Doyle, M.A.
Director of Surgical Education
Massachusetts General Hospital
Lecturer on Surgery, Harvard Medical School
55 Parkman Street - WAC 455Q
Boston, MA 02114
Phone:  617-643-8731
Fax:       617-724-0405
[hidden email]


I'm not an outlier; I just haven't found my distribution yet! -- Ronan M. Conroy, Lecturer in Biostatistics, Royal College of Surgeons of Ireland

Believe those who are seeking the truth, Doubt those who find it. -- Andre Gide

 The information transmitted in this email is intended only for the person or entity to which it is addressed. It may contain privileged or confidential material. Any review, retransmission, dissemination, or other use of this information by other than the intended recipient is prohibited. If you receive this email in error, please contact the sender and delete the material from any computer.

 


From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Parise, Carol A.
Sent: Monday, April 23, 2012 3:00 PM
To: [hidden email]
Subject: Re: Question about dates

In excel, i can:
 
Date2-Date1
 
So if:
 
Date2 = March 15, 2012
Date1 = January 15, 2012
 
I get 60 days.
 
What happens when you try this?
 
 
 

From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Doyle, Jennifer
Sent: Monday, April 23, 2012 11:45 AM
To: [hidden email]
Subject: Question about dates

I have 2 date fields in Excel, and I want to look at the length of time between the 2 dates -- I thought I could simply subtract the first from the second, but that's not working.. ..Does anyone have suggestions for how to accomplish this in either Excel or SPSS? Many thanks!

Jennifer

Jennifer Doyle, M.A.
Director of Surgical Education
Massachusetts General Hospital
Lecturer on Surgery, Harvard Medical School
55 Parkman Street - WAC 455Q
Boston, MA 02114
Phone:  617-643-8731
Fax:       617-724-0405
[hidden email]


I'm not an outlier; I just haven't found my distribution yet! -- Ronan M. Conroy, Lecturer in Biostatistics, Royal College of Surgeons of Ireland

Believe those who are seeking the truth, Doubt those who find it. -- Andre Gide

 The information transmitted in this email is intended only for the person or entity to which it is addressed. It may contain privileged or confidential material. Any review, retransmission, dissemination, or other use of this information by other than the intended recipient is prohibited. If you receive this email in error, please contact the sender and delete the material from any computer.

The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.

Reply | Threaded
Open this post in threaded view
|

Re: Question about dates

Melissa Ives
In reply to this post by Doyle, Jennifer
Question about dates

Look at the date time wizard.

In SPSS dates are stored as second since the start of the Gregorian calendar.

 

Compute daysbtw=date.diff(date2,date1,”DAYS”).

 

Melissa

 

From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Doyle, Jennifer
Sent: Monday, April 23, 2012 1:45 PM
To: [hidden email]
Subject: [SPSSX-L] Question about dates

 

I have 2 date fields in Excel, and I want to look at the length of time between the 2 dates -- I thought I could simply subtract the first from the second, but that's not working.. ..Does anyone have suggestions for how to accomplish this in either Excel or SPSS? Many thanks!

Jennifer

Jennifer Doyle, M.A.
Director of Surgical Education
Massachusetts General Hospital
Lecturer on Surgery, Harvard Medical School
55 Parkman Street - WAC 455Q
Boston, MA 02114
Phone:  617-643-8731
Fax:       617-724-0405
[hidden email]

 

I'm not an outlier; I just haven't found my distribution yet! -- Ronan M. Conroy, Lecturer in Biostatistics, Royal College of Surgeons of Ireland

Believe those who are seeking the truth, Doubt those who find it. -- Andre Gide

 The information transmitted in this email is intended only for the person or entity to which it is addressed. It may contain privileged or confidential material. Any review, retransmission, dissemination, or other use of this information by other than the intended recipient is prohibited. If you receive this email in error, please contact the sender and delete the material from any computer.

The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.



PRIVILEGED AND CONFIDENTIAL INFORMATION
This transmittal and any attachments may contain PRIVILEGED AND
CONFIDENTIAL information and is intended only for the use of the
addressee. If you are not the designated recipient, or an employee
or agent authorized to deliver such transmittals to the designated
recipient, you are hereby notified that any dissemination,
copying or publication of this transmittal is strictly prohibited. If
you have received this transmittal in error, please notify us
immediately by replying to the sender and delete this copy from your
system. You may also call us at (309) 827-6026 for assistance.