Time differences

Bandi
Posted by Bandi under Sql Server category on | Points: 40 | Views : 233
SELECT datediff( HH , '08/09/2014 00:00:44', '08/09/2014 00:08:08') HourDiff,
datediff( mi , '08/09/2014 00:00:44', '08/09/2014 00:08:08') MinuteDiff,
datediff( SS , '08/09/2014 00:00:44', '08/09/2014 00:08:08') SecondDiff -- Calculation for second differences: (8*60)+8-44 = 444 seconds )


/* OUTPUT 
HourDiff MinuteDiff SecondDiff
0 8 444
*/

Comments or Responses

Login to post response