Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How can I calculate/show flights that have departure Time Depending on reload time

Dear Community.

How can I calculate/show flights that have departure time which is greater than reload time by 90 minutes and less than reload time by 90 minutes.

In short, only flights with departure time between (ReloadTime-90minues) and (ReloadTime+90 minutes) should be displayed.

I have attached a sample file for more details.

Thanks,

- Mukram

1 Solution

Accepted Solutions
Not applicable
Author

Mukram,

The date field still needs to clean up. I see a value with time as 20:00:00 PM.

Second the time field in script is same as departure time except for number format. A numeric field would be better for writing set analysis.

However since set analysis is not possible for the field T, I used a If clause (its not good performance per se).

Kiran Rokkam.

View solution in original post

6 Replies
Not applicable
Author

Mukram:

This might help.

Kiran.

Not applicable
Author

hai kiran.

Thanks for your help.

I am looking forward your assistance in order to solve one more criteria as follows:

I am working on dates which contains year 1800 and so on.

i want to consider only time irrespective of the Year ,month ,Day. just i want to compare the time (hh:mm:ss) with the reload time hh:mm:ss

for example: 01/01/1800 14:30:00

                   03/04/2012  14:20:30

from this i want to compare the time with Time(Depaturetime) with sholud be between Reloadtime-90 Mints and reloadtime+90

kindly find the attachment.

Regards,

Mukram.

Not applicable
Author

Mukram,

Enclosed updates. There is a problem with a DepatureTime field, it is not recongnized by QV as a timestamp. You may want to format this while loading making sure that all values in the list box of DepatureTime is in the same format.

Then the logic applied here will work.

Kiran Rokkam.

Not applicable
Author

Hai kiran.

now i fix the date issue.

the date format is correct.

now the requirment is on the basis of time.

which means it should be FlightNo  DepartureTime between on the Reloadtime-90 mints and Reloadtime+90

like,

i    FlightNo,   DepartureTime

     101   ,   10/01/2011 20:40:00

      102   ,10/12/2012   21:00:00

the output should be based on the time(hh:mm:ss) irrespective of the Year ,month,date

if i reload the application at 20:50:00

then reloadtime -90Mints became 19:20 and reloadtime+90 became 22:20

so i need the flight details thhose departuretime in between are equal to 19:20 to 22:20 without considering the year,month,date..

kindly find the attachment.

Thanks,

Mukram.

Not applicable
Author

Mukram,

The date field still needs to clean up. I see a value with time as 20:00:00 PM.

Second the time field in script is same as departure time except for number format. A numeric field would be better for writing set analysis.

However since set analysis is not possible for the field T, I used a If clause (its not good performance per se).

Kiran Rokkam.

Not applicable
Author

Hai,

Kiran.

Thank you for your help.

I clean up the date fileds

Now your solution is working perfectly as per my requirement.

once again thanks for support and help.

Thanks,

Mukram.