You need to sign in to do that
Don't have an account?
Ravi_SFDC
Ravi
Issue in the Business Hours
I do have 2 fields Start Date (DateType: Date/Time) and End Date ((DateType: Date/Time) and Total Hours (Formula Field)
Example: When I select as
Start Date 26/02 11.30 AM IST and
End Date 26/02 10.30 PM IST
Total Hours: 10 hours
Issue: I am using the below formula, your help would be really appreciated
ROUND( 8 * ( ( 5 * FLOOR( ( DATEVALUE( End_Date_Time__c ) - DATE( 1900, 1, 8) ) / 7) + MIN(5, MOD( DATEVALUE( End_Date_Time__c ) - DATE( 1900, 1, 8), 7) + MIN( 1, 24 / 8 * ( MOD( End_Date_Time__c - DATETIMEVALUE( '1900-01-08 16:00:00' ), 1 ) ) ) ) ) - ( 5 * FLOOR( ( DATEVALUE( Start_Date_Time__c ) - DATE( 1900, 1, 8) ) / 7) + MIN( 5, MOD( DATEVALUE( Start_Date_Time__c ) - DATE( 1996, 1, 1), 7 ) + MIN( 1, 24 / 8 * ( MOD( Start_Date_Time__c - DATETIMEVALUE( '1900-01-08 16:00:00' ), 1) ) ) ) ) ), 0 )Regards
Ravi
Can you confirm what excatly the issue here. Do you mean it is not calculating correct? Can you also confirm what excatly you are expecting and what value you are getting here so can suggest based on it.
Thanks,
hi Sai Praveen,
The issue is the hours are being as negative hours (-4 or -5 or -6) instead of 10 hrs referring to the above example.
Thanks