CR-XI
Oracle 9i DB
We have a dataset with due dates that need to be compared to the current date to determine how many WORKING DAYS there are to complete the task.
WORKING DAYS are defined as all days Monday - Friday. We do not close for any holidays - just drop to a minimum staff.
The data looks like this....
ITEM DUE_DATE
=============================
123 2006/12/18
124 2006/12/19
125 2006/12/28
126 2006/12/22
127 2007/01/15
128 2006/12/29
129 2007/01/19
130 2007/02/14
=============================
We need to Group the results into the following ranges.
Due in 1-10 working days
Due in 11-20 working days
Due in 21-30 working days
Due in 31+ working days
I started working with some IF..THEN...ELSE formulas comparing the current date to the Due Date and then subtracting 2 from the count for each weekend based on the current Day of Week.
The formula quickly got HUGE and confusing...so I am wondering if anyone has a more elegant solution.
Thanks in advance.
Oracle 9i DB
We have a dataset with due dates that need to be compared to the current date to determine how many WORKING DAYS there are to complete the task.
WORKING DAYS are defined as all days Monday - Friday. We do not close for any holidays - just drop to a minimum staff.
The data looks like this....
ITEM DUE_DATE
=============================
123 2006/12/18
124 2006/12/19
125 2006/12/28
126 2006/12/22
127 2007/01/15
128 2006/12/29
129 2007/01/19
130 2007/02/14
=============================
We need to Group the results into the following ranges.
Due in 1-10 working days
Due in 11-20 working days
Due in 21-30 working days
Due in 31+ working days
I started working with some IF..THEN...ELSE formulas comparing the current date to the Due Date and then subtracting 2 from the count for each weekend based on the current Day of Week.
The formula quickly got HUGE and confusing...so I am wondering if anyone has a more elegant solution.
Thanks in advance.