I am developing an app that logs the Date & Time when an item is received. The item then has to be delivered to the recipient within a specified time, but taking into account normal business hours. ie if an item is received at 0800hrs with a target of 8hr delivery time, the due time is 1700hrs. Conversly, if another item is received at 1500hrs, the due time is 1300hrs next day. This is based on an 8 hour working day (8am - 5pm) and an 8 hour target time, also taking into account 1 hour lunch break.
So what I need to do is write a function that will calculate the due time when given the received time and target time.
Has anyone got a formulae to do this or similar?