function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Tushar KhorateTushar Khorate 

Finding the Number of Business Days Between Two Dates

Are you looking for this formula: 
 Finding the Number of Business Days Between Two Dates.
Use this formula:
(5 * ( FLOOR( ( DATEVALUE( Date_of_Joining__c) - DATE( 1900, 1, 8) ) / 7 ) ) + MIN( 5, MOD( DATEVALUE(Date_of_Joining__c) - DATE( 1900, 1, 8), 7 ) ) ) - (5 * ( FLOOR( ( DATEVALUE(CreatedDate) - DATE( 1900, 1, 8) ) / 7 ) ) + MIN( 5, MOD( DATEVALUE(CreatedDate) - DATE( 1900, 1, 8), 7 ) ) )
 (Use your date fields instead of Date_of_Joining__c)
If you found this is helpful, Like this solution so that others are also see this. 
APAP
might help - https://thesalesforcetutorial.blogspot.com/2021/07/how-to-calculate-number-of-hours.html