4 Replies Latest reply: Feb 10, 2012 4:24 AM by Henric Cronström RSS

    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.

        • Re: Interval Match
          Henric Cronström

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


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

            • 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
                  Celambarasan Adhimulam


                       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



                  • Interval Match
                    Henric Cronström

                    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.