How to add Time in Coloumn and display the total time of that coloumn

Posted by saisuresh074-17816 under ASP.NET on 9/24/2012 | Points: 10 | Views : 582 | Status : [Member] | Replies : 2
Hi friends,
I have a coloumn in my table which contains time in format hh:mm:ss and now i want to add that whole coloumn time and display that ....i hav
written some query as follows for that

select convert(char(8),dateadd(second,SUM ( DATEPART(HH,(convert(datetime,working_hours,1))) * 3600 +
DATEPART(mi, (convert(datetime,working_hours,1))) * 60 + DATEPART(ss,(convert(datetime,working_hours,1)))),0),108) as t
FROM logindetails where date between @fromdate and @todate and user_id=@user_id and logout_time is not null

this is not adding if data has like plz help me out..


Posted by: Jayakumars on: 9/29/2012 [Member] [MVP] Bronze | Points: 25
Posted by: Jayakumars on: 9/29/2012 [Member] [MVP] Bronze | Points: 25

Please mark as answer if it helpful to you.

Mark as Answer if its helpful to you
EmailId :

saisuresh074-17816, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response