Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
 joeybird
		
			joeybird
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		
Hiya
I have a an time expression calculation
interval(avg(ShoppingTime)/1440,'h:mm') - interval(avg(ActualShoppingTime)/1440,'h:mm')
I wish to if the answer is a minus, just show 00:00:00 and not e.g - 01:00:00
is this possible please
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		May be this:
Interval(If(Avg(ShoppingTime) - Avg(ActualShoppingTime) <= 0, 0, (Avg(ShoppingTime) - Avg(ActualShoppingTime))/1440), 'h:mm')
 
					
				
		
 Qrishna
		
			Qrishna
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Try
=fabs(interval(avg(ShoppingTime)/1440,'h:mm') - interval(avg(ActualShoppingTime)/1440,'h:mm'))
- fabs() function returns the absolute value of x. The result is a positive number.
 
					
				
		
 marcus_sommer
		
			marcus_sommer
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		I think you will need an if-check like:
interval(if(avg(ShoppingTime) < avg(ActualShoppingTime), 0,
(avg(ShoppingTime) - avg(ActualShoppingTime)) /1440),'h:mm')
- Marcus
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		May be this:
Interval(If(Avg(ShoppingTime) - Avg(ActualShoppingTime) <= 0, 0, (Avg(ShoppingTime) - Avg(ActualShoppingTime))/1440), 'h:mm')
 
					
				
		
 joeybird
		
			joeybird
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		awesome thank you , worked brill
