Look at the DATEPART function. It will take a little work but it is doable. For example, grab the first value, then use the DATEPART function to add 5 minutes to that value. Then loop through the results looking for that value. When found, use the DATEPART function again to add 5 minutes and loop again, repeating the process. There is probably a way to do this without looping, but this is just the first thing that came to mind.
|