I have the following data:
TaskID ActionID User ActionDateAndTme
1 11 1 2008-07-02 08:45:00
1 12 1 2008-07-02 08:50:00
1 13 2 2008-08-02 09:45:00
2 11 1 2008-10-02 08:45:00
2 12 1 2008-11-02 08:50:00
2 13 2 2008-14-02 09:45:00
I need the following result:
TaskID ActionID User ActionDateAndTme ElapsedTime
1 11 1 2008-07-02 08:45:00 0
1 12 1 2008-07-02 08:50:00 00:00:05:00 (dd:hh:mm:ss)
1 13 2 2008-08-02 09:45:00 31:00:55:00
2 11 1 2008-10-02 08:45:00 0
2 12 1 2008-11-02 08:45:00 31:00:00:00
2 13 2 2008-11-02 08:50:00 00:00:05:00