SELECT
name
,
CONVERT
(DATETIME, DATEADD(s,
SUM
(( DATEPART(hh, Timer) * 3600 )
+ ( DATEPART(mi, Timer) * 60 ) + DATEPART(ss, Timer)), 0))
AS
total_time
FROM
Project_To_Done Groupbyname
but the result is shown like this
Ali 1900-01-01 00:00:05.000 ddd 1900-01-01 00:22:22.000
I want time like 00:22:22 or 00:00:05
How can i do this?
If you want to show only time in Label then use it like this
<
asp:Label
ID
=
"lblTime"
Text='<%# Eval("Time", "{0:hh:mm:ss}") %>' runat="server" />
Thank You.
Thankyou i get my desired answer my answer is this
SELECT name,CONVERT(time(0), DATEADD(s, SUM(( DATEPART(hh, Timer) * 3600 ) + ( DATEPART(mi, Timer) * 60) + DATEPART(ss, Timer)), 0)) AS Totaltime FROM Project_To_Done Group by name
© COPYRIGHT 2025 ASPSnippets.com ALL RIGHTS RESERVED.