I have a table 'mytable' like this
ID | dateTime | data |
------------------------------------------
1 | 2013-09-01 00:15:00 | some data |
2 | 2013-09-01 00:15:00 | some data |
4 | 2013-09-01 00:15:00 | some data |
5 | 2013-09-01 00:30:00 | some data |
6 | 2013-09-01 00:30:00 | some data |
7 | 2013-09-01 00:30:00 | some data |
8 | 2013-09-01 00:45:00 | some data |
9 | 2013-09-01 00:45:00 | some data |
10 | 2013-09-01 00:45:00 | some data |
I was fine before but I accidentally changed the dateTime to round to 15 minutes (I was supposed to round it for 5 minutes) please refere to this, No I want to round the time for 5 minutes.
I think the only way I can do this, is to get the dateTime of one record then check the record in the next row, if both are same then add 5 minutes into it. How do I get the value of the next row and compare it with previous one?
Can anyone help me with this??
Thanks