Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 how to calculat time different

Author  Topic 

rudba
Constraint Violating Yak Guru

415 Posts

Posted - 2009-03-18 : 16:30:49
How do i get the time diffrent?

StartTime:Mar 18 2009 4:23PM
EndTime :Mar 18 2009 3:23PM

DiffTime : 1:00:59

sakets_2000
Master Smack Fu Yak Hacker

1472 Posts

Posted - 2009-03-18 : 16:33:03
look for datediff function.
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2009-03-18 : 16:33:45
SELECT CONVERT(CHAR(8), DATEADD(SECOND, DATEDIFF(SECOND, StartTime, EndTime), 0), 108)



E 12°55'05.63"
N 56°04'39.26"
Go to Top of Page

rudba
Constraint Violating Yak Guru

415 Posts

Posted - 2009-03-18 : 16:41:50
Thanks, guys
Go to Top of Page
   

- Advertisement -