You need to sign in to do that
Don't have an account?
Ben Merton 15
Quite complex date/time and business hours question
Supposing I have a Work Order with Completion_Date_Time__c and I am trying to work out the Date_Time of material required based both on a Delivery_Time__c AND the Business Hours / Holidays.
So working backwards it would be just Completion_Date_Time__c MINUS the Delivery_Time__c MINUS the NON-Business Hours/Holidays. But what if that calculation AGAIN lands on a holiday / crosses a holiday. You would need to parse this out? Or am I completely missing something?
Are there any methods that can perform this calculation?
So working backwards it would be just Completion_Date_Time__c MINUS the Delivery_Time__c MINUS the NON-Business Hours/Holidays. But what if that calculation AGAIN lands on a holiday / crosses a holiday. You would need to parse this out? Or am I completely missing something?
Are there any methods that can perform this calculation?
NOTE: This code has not been tested and may contain typographical or logical errors
[1] https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_businesshours.htm