Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I'm using timer in the qlikview...
I just want to convey message to user at the particular time...
=If( (Time#(Now())>Time#('11:00:00', 'hh:mm:ss')) and (Time#(Now())<Time#('16:00:00', 'hh:mm:ss')) , 'Peak Time', Time#(Now()))
Somehow the above condition is not fetching the message.
Any help is highly appreciated!
Try this:
=If(Num(Frac(Now())) > Num(Time#('11', 'hh')) and Num(Frac(Now()))< Num(Time#('16', 'hh')), 'Peak Time', Time(Now()))
Try this:
=If(Num(Frac(Now())) > Num(Time#('11', 'hh')) and Num(Frac(Now()))< Num(Time#('16', 'hh')), 'Peak Time', Time(Now()))
Sunny,
Can i please know Num(Frac(Now())) functionality....
When i tried that function separately it's throwing decimal value.
Num() function include Date and Time and when you do a comparison just to the time you are basically comparing 42418.678.... to a very small decimal number 0.45833333 or 0.666667. By doing frac, I remove the 42418 part and do the comparison of just the time component:
0.678... > 0.45833333 and 0.678 < 0.666667
instead of
42418.678 > 0.4583333 and 42418.678 < 0.666667 which will always be false
Does that make sense?
Got it!
Thanks a lot friend
No problem at all