Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

Interval Match

Hi all,

I need assistance with interval match.

I have a table with the StartDate (2011/01/29 00:01) and EndDate (2011/01/29 00:05), both these have time in them. My second table I am loading has minutes of the day, eg 00:01, 00:02, etc. What I am trying to do is create an intervalmatch that will give me intervals that the start date and end date fall under. in this call the interval would be 05, as in that transaction happened in the 5 minute interval.

I am using this to check intervals when people sing in and out of the building.

Your assistance will be highly appreciated.

Tags (1)
4 Replies

Re: Interval Match

You should look at the Class function. I would probably do something like

TimeStamp(Class(Time, 5/24/60)) as TimeInterval

Not applicable

Interval Match

Hi Henric,

Sorry but I dont understand. Do i do the class function on the check in time or check out?

And must I ignore trying to do the intervalmatch on the minutes table I loaded?

Interval Match

Hi,

     Check with the interval function and create a separate field for this Interval(EndDate-StartDate,'hh:mm') as somefield name same as the field that you need to classify using the second table you will get the difference in minutes.

Hope it helps

Celambarasan

Interval Match

If you want to convert a time to an interval - like a lookup - then you should use the class function in the script. And you should perhaps use it for both StartTime and EndTime. Depends on what to you want to display if StartDate belongs to one interval and EndDate belongs to another...

Intervalmatch is used when you have times in one table and the intervals defined in a second table and you want to link them both.

The Interval function that Celambarasan points at is used if you have time spans that you want to format as intervals in minutes.