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
 SQL Server 2000 Forums
 SQL Server Development (2000)
 How to add teo time

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2006-11-09 : 08:17:43
putane writes "Hi

show me the code to add 2 time

@a:11:28:05 & @b:10:25:35

please help iam in very critical position."

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2006-11-09 : 08:26:03
[code]declare @a varchar(10),
@b varchar(10)

select @a = '11:28:05',
@b = '10:25:35'

select convert(varchar(10), dateadd(second, datediff(second, 0, convert(datetime, @a)) + datediff(second, 0, convert(datetime, @b)), 0), 108)
[/code]


KH

Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2006-11-09 : 15:33:06
Duplicate post http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=74607


Peter Larsson
Helsingborg, Sweden
Go to Top of Page
   

- Advertisement -