I have a column ("timestamp2") including 66 times and want to find the nearest time for each time, and then calculate the time interval for these two times.
For example, the first time in the column "timestamp2" is "2020-08-18 18:15:37", the nearest time to this time should be "2020-08-18 18:15:44" and the time interval between these two times should be 6 seconds.
There are many solutions to the problem of finding the closest time for a given time in a time column. My question is a little different as it requires searching within the given column and needs to require the time and time interval.