Date: Tue, 28 Nov 2006 12:37:42 -0600
Reply-To: Melissa Ives <mives@chestnut.org>
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: Melissa Ives <mives@chestnut.org>
Subject: Re: Activity Between Dates
Content-Type: text/plain; charset="us-ascii"
How will you know which activities to combine at which times? Will you
always combine activity 1 and 2, but keep 3 separate? You have
different time periods for each client--what is the rule for reporting
these for each client?
You could compute a min(ACT1ST,ACT2ST...) to max(ACT1END,ACT2END...) to
compute the widest range, then sum the appropriate activity hours.
Melissa
-----Original Message-----
From: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU] On Behalf Of
Kahklen, Craig
Sent: Tuesday, November 28, 2006 12:21 PM
To: SPSSX-L@LISTSERV.UGA.EDU
Subject: [SPSSX-L] Activity Between Dates
Hello,
I am having difficulty trying to come up with syntax that will produce
what I need. I need to calculate activity hours between dates when
clients can participate in more than one activity in a given time
period.
The results I need using the data below are:
Client 1 participated for 80 hours from 9/1/06 to 9/21/06 and for 10
hours
9/25/06 to 9/30/06.
Client 2 participated for 50 hours from 9/1/06 and 9/14/06.
Client 3 participated for 80 hours from 9/1/06 and 9/30/06...and so on.
Here is the data:
DATA LIST /ID 1
ACT1ST 3-10 (ADATE) ACT1END 12-19 (ADATE) a 21-22
ACT2ST 24-31 (ADATE) ACT2END 33-40 (ADATE) ACT2HRS 42-43
ACT3ST 45-52 (ADATE) ACT3END 54-61 (ADATE) ACT3HRS 63-64.
BEGIN DATA
1 09/01/06 09/14/06 40 09/07/06 09/21/06 40 09/25/06 09/30/06 10
2 09/01/06 09/14/06 40 09/05/06 09/12/06 10
3 09/01/06 09/08/06 20 09/09/06 09/30/06 60
4 09/01/06 09/05/06 20 09/21/06 09/30/06 60
5 09/18/06 09/30/06 90
END DATA.
Please note that clients can have between 1 and 9 activities in a given
month and activities can be performed concurrently.
I would appreciate any help I can get.
Thank you,
Craig Kahklen
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.