Samoin
asked on
Query to get minutes and seconds
Hi All,
I'm trying to write a query which will give me difference between two datetime columns, but the problem is I get answer only in minutes or seconds. I want to have the answer as hh:mm:ss. Below is the query I'm using
For example
Results
X y [Total Time] (in mins)
abc fcd 8
But I want
x y [Total Time] (in mm:ss)
abc fcd 8:24
Thanks
I'm trying to write a query which will give me difference between two datetime columns, but the problem is I get answer only in minutes or seconds. I want to have the answer as hh:mm:ss. Below is the query I'm using
For example
Results
X y [Total Time] (in mins)
abc fcd 8
But I want
x y [Total Time] (in mm:ss)
abc fcd 8:24
Thanks
SELECT X,Y,Z, DATEDIFF("n",[Start time], [End time]) as [Total Time]
FROM [Table A]
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.