Click here to Skip to main content
15,886,689 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hii,

I want to find difference between two time how to find this ?
In SQL SERVER :

Time :
'18:51:13.7800000',
'18:07:41.6070000'

thank you .
Posted

Use Timespan or Datediff to calculate the date difference.
 
Share this answer
 
Use DATEDIFF[^].
 
Share this answer
 
select datediff(minute, '18:07:41.6070000', '18:51:13.7800000')

gives the difference in minutes

select datediff(ss, '18:07:41.6070000', '18:51:13.7800000')

does it in seconds. It's TOTAL seconds, not seconds after minutes, so you need to work with it from there.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900