We messed up on application side and loaded some incorrect data in one column.. Now we need to fix this data.. Here is what we need to do.
Starttime Answertime
2012-08-30 00:40:40.000 2012-08-30 03:40:53.000
Answertime is almost 3 hour more than starttime which is incorrect. Now what we need to is find the difference of seconds between answertime and startime and add it to starttime. So for above 2012-08-30 00:40:53.000 will be new answertime.
Kind of confused at the moment on how to do it. Using sql server 2008 R2
The gist of the answer is that leaving Minutes:Seconds.MilliSecs aside, the answertime is put into the same hour as the starttime. It also fixes edge cases like the 2nd row where the change makes it earlier than the starttime.