You are here:

MS SQL Server/how to get time difference in SQL server 2005

Advertisement


Nive wrote at 2013-02-14 09:32:10
select convert(time, dateadd(minute, datediff(minute, LoginEndTime, LoginStartTime), 0)) as Totaltimespent from table1



Regards

Nivethitha


MS SQL Server

All Answers


Answers by Expert:


Ask Experts

Volunteer


Jwalant Natvarlal Soneji

Expertise

From general queries about SQL Severs both 2000 and 2005 to advanced features like Integration Services and Reporting Services.

Experience

Experience in the area: I have been working with database triggers, stored procedures, views, function, joins, dts, Query optimization. Education/Credentials: BE IT - 2005 Batch with First Class.

Publications
http://jwalantsoneji.com

Education/Credentials
BE IT, India

Awards and Honors
MCP

©2016 About.com. All rights reserved.