Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
can anyone explain me why in my example the if clause is not working? I think the problem is maybe in the time format. But I working on it over 3 hours and I can#t find the answer...
What I#am doing wrong?
The result must be INSIDE for both and not OUTSIDE
I hope anyone can help me ... THanks
I think this should solve your needs
if(frac(MinF) >= MakeTime(Hour(MinF)) AND frac(MinF) < MakeTime(Hour(MinF),30) , 'Inside', 'Outside' ) as StartGK
Be carefull when using timestamp, your Minf was formated as hh:mm:ss but actually still has the date inside it
Your application is full of invalid expressions, is it correct?
Oh ya, I think this is better...
Could you kindly guide me where should I check your "IF" that isn´t working?
Take my new File. The script is important! When you look at the if clause you will see that for ID 1 the min time value is 05:00:00.
And now the if clause is...
If( 05:00:00 >= 05:00:00 AND 05:00:00 < 05:30:00, Inside, Outside )
The result must be Inside but QlikView says Outside. I don't know why...
Could you describe your Business rule?
I think this should solve your needs
if(frac(MinF) >= MakeTime(Hour(MinF)) AND frac(MinF) < MakeTime(Hour(MinF),30) , 'Inside', 'Outside' ) as StartGK
Be carefull when using timestamp, your Minf was formated as hh:mm:ss but actually still has the date inside it
Oh yess, thank you. But why is the Minf not formated as time? I use time()... And frac is cutting the date?
frac() get rid of date part
Try this at script and change the format verifying the differences
LOAD
date(now()) as date1,
date(floor(now())) as date2,
time(now()) as time1,
time(frac(now())) as time2
autogenerate 1;