|
Good Day SPSS list,
I have a question regarding the computation of paperwork due dates on two separate items using the same reference date (Opening date). The problem is that one item (Assessment) requires an annual update and the other (Client Plan) requires a bi-annual update. Ex. Opening date = 7-1-02 so the 1st Assessment update is due by 7-1-03 whereas the 1st Client plan update is due by 1-1-03 and so on. This seems to be a simple problem to solve with a do else statement, but I don't know how to compute this. Could someone assist me in this endeavor? Thank you, Kevin Secrist, Administrative Analyst, Associate ASD Butte County Behavioral Health CONFIDENTIALITY NOTICE: This e-mail transmission, and any documents or messages attached to it, may contain confidential information that is legally privileged. If you are not the intended recipient, or a person responsible for delivering this e-mail to the intended recipient, then you are (1) notified that any disclosure, copying, distribution, saving, reading or use of this information is strictly prohibited, (2) requested to discard and delete this e-mail and any attachments, and (3) requested to immediately notify us by e-mail that you mistakenly received this message [hidden email], fax (530) 895-6548, or telephone (530) 879-3305. Thank you. Far better an approximate answer to the right question, which is often vague, than the exact answer to the wrong question, which can always be made precise. Ann. Math. Stat. 33 (1962) - John w. Tukey |
|
For me, due dates are a constant:
COMPUTE duedate = $yesterday. - James |
|
In reply to this post by Secrist, Kevin
Kevin,
Look at the date functions in SPSS help. I believe that DateSum(opendate,1,"YEARS"). will get your first due date and some variation on Datesum(0pendate,6,"MONTHS"). will get your second. DATESUM. DATESUM(datetime, value, "unit", "method"). Numeric. Calculates a date or time value a specified number of units from a given date or time value, where datetime is a date or time format variable (or numeric value that represents a valid date/time value), and "unit" is one of the following string literal values, enclosed in quotes: years, quarters, months, weeks, days, hours, minutes, seconds. The optional method, enclosed in quotes, can be "rollover" or "closest". The rollover method advances excess days into the next month. The closest method uses the closest legitimate date within the month; this is the default. The value returned is a date/time value expressed as a number of seconds. To display the value as a date/time, assign the appropriate format to the variable. Melissa The bubbling brook would lose its song if you removed the rocks. -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Secrist, Kevin Sent: Wednesday, March 14, 2007 1:10 PM To: [hidden email] Subject: [SPSSX-L] How do I compute due dates? Good Day SPSS list, I have a question regarding the computation of paperwork due dates on two separate items using the same reference date (Opening date). The problem is that one item (Assessment) requires an annual update and the other (Client Plan) requires a bi-annual update. Ex. Opening date = 7-1-02 so the 1st Assessment update is due by 7-1-03 whereas the 1st Client plan update is due by 1-1-03 and so on. This seems to be a simple problem to solve with a do else statement, but I don't know how to compute this. Could someone assist me in this endeavor? Thank you, Kevin Secrist, Administrative Analyst, Associate ASD Butte County Behavioral Health CONFIDENTIALITY NOTICE: This e-mail transmission, and any documents or messages attached to it, may contain confidential information that is legally privileged. If you are not the intended recipient, or a person responsible for delivering this e-mail to the intended recipient, then you are (1) notified that any disclosure, copying, distribution, saving, reading or use of this information is strictly prohibited, (2) requested to discard and delete this e-mail and any attachments, and (3) requested to immediately notify us by e-mail that you mistakenly received this message [hidden email], fax (530) 895-6548, or telephone (530) 879-3305. Thank you. Far better an approximate answer to the right question, which is often vague, than the exact answer to the wrong question, which can always be made precise. Ann. Math. Stat. 33 (1962) - John w. Tukey 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. |
|
As I re-read my question I find I wasn't as clear as I needed to be. I
see how Datesum will work for the first set of updates, however what about the successive updates? How for instance would I compute the next update if the client was opened on 7-1-2002 and I want to know if either the client plan or assessment are overdue for this year? This dataset is made up of a random sample of 30 clients taken from a population of approx. 2500. I run this data extraction every month and have clients that have been open since 1991 as well as those who opened one month prior to the extraction date. I could have data that would look something like this. Client Name opening date Assessment due Client plan due John Doe 5-20-2002 ? ? Jane Smith 2-10-2007 ? ? John Smith 7-18-1999 ? ? As I see it I would need some kind of procedure that would take into account the current system date and compare it to the original opening date to compute the due dates for each of the items. Thanks Kevin Secrist -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Melissa Ives Sent: Wednesday, March 14, 2007 12:00 PM To: [hidden email] Subject: Re: How do I compute due dates? Kevin, Look at the date functions in SPSS help. I believe that DateSum(opendate,1,"YEARS"). will get your first due date and some variation on Datesum(0pendate,6,"MONTHS"). will get your second. DATESUM. DATESUM(datetime, value, "unit", "method"). Numeric. Calculates a date or time value a specified number of units from a given date or time value, where datetime is a date or time format variable (or numeric value that represents a valid date/time value), and "unit" is one of the following string literal values, enclosed in quotes: years, quarters, months, weeks, days, hours, minutes, seconds. The optional method, enclosed in quotes, can be "rollover" or "closest". The rollover method advances excess days into the next month. The closest method uses the closest legitimate date within the month; this is the default. The value returned is a date/time value expressed as a number of seconds. To display the value as a date/time, assign the appropriate format to the variable. Melissa The bubbling brook would lose its song if you removed the rocks. -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Secrist, Kevin Sent: Wednesday, March 14, 2007 1:10 PM To: [hidden email] Subject: [SPSSX-L] How do I compute due dates? Good Day SPSS list, I have a question regarding the computation of paperwork due dates on two separate items using the same reference date (Opening date). The problem is that one item (Assessment) requires an annual update and the other (Client Plan) requires a bi-annual update. Ex. Opening date = 7-1-02 so the 1st Assessment update is due by 7-1-03 whereas the 1st Client plan update is due by 1-1-03 and so on. This seems to be a simple problem to solve with a do else statement, but I don't know how to compute this. Could someone assist me in this endeavor? Thank you, Kevin Secrist, Administrative Analyst, Associate ASD Butte County Behavioral Health CONFIDENTIALITY NOTICE: This e-mail transmission, and any documents or messages attached to it, may contain confidential information that is legally privileged. If you are not the intended recipient, or a person responsible for delivering this e-mail to the intended recipient, then you are (1) notified that any disclosure, copying, distribution, saving, reading or use of this information is strictly prohibited, (2) requested to discard and delete this e-mail and any attachments, and (3) requested to immediately notify us by e-mail that you mistakenly received this message [hidden email], fax (530) 895-6548, or telephone (530) 879-3305. Thank you. Far better an approximate answer to the right question, which is often vague, than the exact answer to the wrong question, which can always be made precise. Ann. Math. Stat. 33 (1962) - John w. Tukey 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. |
|
At 04:16 PM 3/14/2007, Secrist, Kevin wrote:
>As I re-read my question I find I wasn't as clear as I needed to >be. I see how Datesum will work for the first set of updates, however >what about the successive updates? How for instance would I compute >the next update if the client was opened on 7-1-2002 and I want to >know if either the client plan or assessment are overdue for this year? You've been giving examples of what you want, but I don't think that's enough; anyway, I don't find it so. You ask, "How would I compute the next update"? To answer that, what's the rule that determines update dates, original or 'next'? Don't worry about SPSS code; give the rules in colloquial form. It's probably not bad in SPSS. The trick here, as many times, is to understand the problem in the first place. -Good luck, Richard Ristow |
| Free forum by Nabble | Edit this page |
