Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 0li5a3a
		
			0li5a3a
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi there,
I have a filed in my DB which contain the Date with the stamp, If I put the colun in a chart or table I can see the timestamp but if I create a text box to display thre date is display only -.
I need to calculate the number of hours between the time now() and my date from my DB and display red if is more then 12h or green if is < 12h.
I have tried
=if(Num(Hour(interval(now()-Date)))>'12:00:00','Red','Green') but this is not right.
Regards,
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		How about this
=If((Now() - Date) > MakeTime(12), 'Red', 'Green')
 Chanty4u
		
			Chanty4u
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		expression working in text box
=if(Num(Hour(interval(now()-Date)))>'12:00:00','Red','Green')
 
					
				
		
 sasiparupudi1
		
			sasiparupudi1
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		what is your timestamp format
 Peter_Cammaert
		
			Peter_Cammaert
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		A few preliminary remarks:
BTW the simplest expression is probably this (on condition that Date has but a single correct DateTime value):
=IF (LocalTime() - Date > 0.5, 'Red', 'Green')
