Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join this live chat April 6, 10AM EST - QlikView to Qlik Sense REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
r20017aaa
Creator III
Creator III

compare time

I have a list of time and want to know if they are in the future or past compare to now.

16-07-2018 10-31-29.png

so expecting to see:

16-07-2018 10-33-18.png

any idea, I tied to play with the interval function but not sucess yet...

Thanks

Raphael

LOAD * INLINE [

    MyTime

    01:00

    05:00

    10:00

    15:00

    20:00

];

1 Solution

Accepted Solutions
sergio0592
Specialist III
Specialist III

Hi,

Use as expression :

if(time#(MyTime,'HH:MM:SS')<time(Now()),'Past','Future')

See the attached .qvw.

Regards

View solution in original post

4 Replies
sergio0592
Specialist III
Specialist III

Hi,

Use as expression :

if(time#(MyTime,'HH:MM:SS')<time(Now()),'Past','Future')

See the attached .qvw.

Regards

View solution in original post

tresesco
MVP
MVP

Try:

If(MyTime>=Frac(Now()), 'Future', 'Past')

r20017aaa
Creator III
Creator III
Author

Many thanks!

thevingo
Creator
Creator

Hi

I know its already answered, but the solution doesn't work for me. My solution is:

Load *, If(Diff>0, 'Future', 'Past') as Flag_TIME;

Load *, Num(MyTime)-num(Time(Now())) + Num(Today()) as Diff, Time(Now()) as Now;

LOAD * INLINE [

    MyTime

    01:00

    05:00

    10:00

    15:00

    20:00

];

The result is

Capture.PNG