Hi All,
I need your help with a logic which I need to implement in a SLA tracking application.
I have designed an App which will capture details from the user and feed into an access database. A parallel thread monitors the database every second and depending on the conditions fires a mail to respective users.
What I need to be able to achieve is the following:
If I have a Px issue then I'd like the thread to check if the next follow up date and time falls within Business hours. If it does, then increment the next follow up date by certain hours and fire a mail. If it doesn't then, using a SQL statement I need to set the Next follow up date to the next day at start of business.
For Ex: Let Start of business is 9:30 AM and Close of Business is 6:30 PM. If an user creates a Px issue at 20/05/2013 3:30 PM then, the next follow up should happen at 20/05/2013 7:30 i.e. 4 hour interval. As this is out of Business hours, the next follow up should be set to 21/05/2013 9:30 AM. However if the issue was created at let's say 20/05/2013 12:30 PM then the next follow up should happen at 20/05/2013 4:30 PM and a mail should be fired advising of the next follow up date and time as it is within business hours.
I just need the logic to implement the business hours part and the respective SQL statements. I am fine with the code for mailing.
I hope this is clear enough and explains what I am trying to achieve. If not please let me know.
Thanks,
I need your help with a logic which I need to implement in a SLA tracking application.
I have designed an App which will capture details from the user and feed into an access database. A parallel thread monitors the database every second and depending on the conditions fires a mail to respective users.
What I need to be able to achieve is the following:
If I have a Px issue then I'd like the thread to check if the next follow up date and time falls within Business hours. If it does, then increment the next follow up date by certain hours and fire a mail. If it doesn't then, using a SQL statement I need to set the Next follow up date to the next day at start of business.
For Ex: Let Start of business is 9:30 AM and Close of Business is 6:30 PM. If an user creates a Px issue at 20/05/2013 3:30 PM then, the next follow up should happen at 20/05/2013 7:30 i.e. 4 hour interval. As this is out of Business hours, the next follow up should be set to 21/05/2013 9:30 AM. However if the issue was created at let's say 20/05/2013 12:30 PM then the next follow up should happen at 20/05/2013 4:30 PM and a mail should be fired advising of the next follow up date and time as it is within business hours.
I just need the logic to implement the business hours part and the respective SQL statements. I am fine with the code for mailing.
I hope this is clear enough and explains what I am trying to achieve. If not please let me know.
Thanks,