Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I'm having some trouble using intervalmatch.
What I want to do:
Link the columns start(time) and end(time) (they're timestamps from a file) to a manually created column, let's call it MinuteID.
Expected result: To each MinuteID are all rows linked which have a start(time) <= MinuteID and an end(time) >= MinuteID. Which includes that one MinuteID can occur multiple times with different files (start/end combinations)
I wrote my code and in 95% it runs fine. But in 5% the data isn't linked by intervalmatch - it seems like all of that 5% have a start(time) where the minute is 00 (for example 14:00:35). But there are also cases where minute 00 is no problem.
Example:
start: 7.11.2014 10:00:00 //decimal: 41,950.416 666 666 672
end: 7.11.2014 10:00:12 //decimal: 41,950.416 805 555 556
Expected MinuteID linked to this: 7.11.2014 10:00:00 (and yes, it exists!) //decimal: 41,950.416 666 666 672
Does anyone guess how to solve this problem?
Thank you!
Kind regards
Johannes
Please post sample data/app
Think that you need to truncate also the minutes in the logfile to full integers in order to have a match.
Not quite clear, how you wish to handle a log starting at 10:59 and ending at 11:01?
HTH Peter
I found the problem. It was simple but hidden deep. There was just no data to match. If you format the MinuteID as DateTime everything was fine. Even if you format it as decimal - but you had to set the number of decimals after decimal point to 14 digits to see that the MinuteID was < than the start(time). Because of the fact that the duration (endtime - starttime) was less than one minute even the next MinuteId was not in range. So it didin't match.