Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
Hi I have 2 fields Logged on and Closed on.
I want to calculate the number of hours between the 2 excluding weekends and the working day is only 7am to 5pm.
If a case is opened and closed outside of this time then i want it to return a 0.
Does any one know the correct formula for this?
thanks,
laura
 
					
				
		
Interval(
rangesum(
NetWorkDays([Logged On]+1,[Closed On]-1) * MakeTime(10)
,if(NetWorkDays([Closed On],[Closed On]),Rangemin(rangemax(frac([Closed On]),maketime(7)),maketime(17))-Rangemax(rangemin(frac([Closed On]),maketime(7)),maketime(7)),0)
,if(NetWorkDays([Logged On],[Logged On]),Rangemin(rangemax(frac([Logged On]),maketime(17)),maketime(17))-Rangemax(rangemin(frac([Logged On]),maketime(17)),maketime(7)),0)
,if(NetWorkDays([Logged On],[Logged On]) and floor([Logged On])=floor([Closed On]),-MakeTime(10))))as Status_WorkingHours_Cal,
 
					
				
		
 swuehl
		
			swuehl
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Have a look at
 
					
				
		
Interval(
rangesum(
NetWorkDays([Logged On]+1,[Closed On]-1) * MakeTime(10)
,if(NetWorkDays([Closed On],[Closed On]),Rangemin(rangemax(frac([Closed On]),maketime(7)),maketime(17))-Rangemax(rangemin(frac([Closed On]),maketime(7)),maketime(7)),0)
,if(NetWorkDays([Logged On],[Logged On]),Rangemin(rangemax(frac([Logged On]),maketime(17)),maketime(17))-Rangemax(rangemin(frac([Logged On]),maketime(17)),maketime(7)),0)
,if(NetWorkDays([Logged On],[Logged On]) and floor([Logged On])=floor([Closed On]),-MakeTime(10))))as Status_WorkingHours_Cal,
 
					
				
		
 swuehl
		
			swuehl
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Yes, seems like you have already found the thread or a derivate.
