Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
Maybe try Pick(Wildmatch()) combination?
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 ?
try here fabs
,if(fabs(GMTID='-4:00',
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)))
Nope , it did not work
It is time.
Thank you, it worked, is it a good idea to do wildmatch here since I am matching GMT value? please advise