I currently have a system written in ASP that is used for logging maintenance faults in various different buildings. When the fault is logged, a logged date and time is generated.
We then put a response time against this which is either 4 hours, 1 day, 5 days, or 28 days. Depending on the response time that is chosen, a scheduled resolution time is generated.
For example, if the fault was logged on 01/01/09 12:00 and the chosen response time is 5 days, the system would generate a scheduled resolution date/time of 05/01/09 12:00.
The problem I have is that, when generating the scheduled resolution time, I don't want this to include weekends. So, for example, if a fault was logged on a Wednesday and put on a 5 day priority, rather than the scheduled resolution time be on the Monday, I only want it to count weekdays, so the scheduled resolution time would be on the following Wednesday (5 working days).
At the moment I am using: dateadd("d", 5, records1(m,3)) I have tried using w instead of d but it is still including weekends when generating the scheduled resolution time.
Can anyone help?
We then put a response time against this which is either 4 hours, 1 day, 5 days, or 28 days. Depending on the response time that is chosen, a scheduled resolution time is generated.
For example, if the fault was logged on 01/01/09 12:00 and the chosen response time is 5 days, the system would generate a scheduled resolution date/time of 05/01/09 12:00.
The problem I have is that, when generating the scheduled resolution time, I don't want this to include weekends. So, for example, if a fault was logged on a Wednesday and put on a 5 day priority, rather than the scheduled resolution time be on the Monday, I only want it to count weekdays, so the scheduled resolution time would be on the following Wednesday (5 working days).
At the moment I am using: dateadd("d", 5, records1(m,3)) I have tried using w instead of d but it is still including weekends when generating the scheduled resolution time.
Can anyone help?