Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 ashis
		
			ashis
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hello ,
I have two fields and I am calculating GMT with the following command
Table1:
StartTimeReportUserTimeZone,,
StartTimeReport,
time#(interval(time(StartTimeReportUserTimeZone, 'hh:mm') - time(StartTimeReport, 'hh:mm'), 'h:mm'),'h:mm') as GMTID
from table1;
LOAD *,
if(GMTID='1:00','London',if(GMTID='2:00', 'Europe',if(GMTID='5:30','India', if(GMTID='8:00', 'Hongkong' ,if(GMTID='-4:00', 'Canada','NA'))))) as Location
resident table1;
drop table table1;
problem is when the value is -4:00 the location Cananda is not showing .
is something problematic where I am calculating GMTID. for all other values it is working fine.
Please advise.
 
					
				
		
 tomasz_tru
		
			tomasz_tru
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Maybe try Pick(Wildmatch()) combination?
 
					
				
		
 tomasz_tru
		
			tomasz_tru
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Maybe try Pick(Wildmatch()) combination?
May be try with this?
LOAD *,
if(GMTID='1:00','London',if(GMTID='2:00', 'Europe',if(GMTID='5:30','India', if(GMTID='8:00', 'Hongkong' ,if(Fabs(GMTID)='4:00', 'Canada','NA'))))) as Location
resident table1;
This should work, But not exactly rule of the scenario. Will you provide sample ?
 Chanty4u
		
			Chanty4u
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		try here fabs
,if(fabs(GMTID='-4:00',
 Chanty4u
		
			Chanty4u
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		
 Chanty4u
		
			Chanty4u
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		if it is not time you can try below way
=IF(Column(1)<0 and Column(2)<0,(Column(1)/Column(2))*-1,(Column(1)/Column(2)))
 ashis
		
			ashis
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Nope , it did not work
 ashis
		
			ashis
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		It is time.
 ashis
		
			ashis
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Thank you, it worked, is it a good idea to do wildmatch here since I am matching GMT value? please advise
