Site Sponsored By: SQLDSC - SQL Server Desired State Configuration
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.
Hey all,I have a stored procedure which returns a start date and an end date and duration. Is there away to set the duration to be in 'HH:MM:SS' rather than the defualt of 'YYYY:MM:DD HH:MM:SS' using a function like DATEDIFF
startdate,enddate,DATEDIFF (HOUR, startdate, enddate) AS duration
from 2008 onwards you've time datatype so you can even cast to time datatype to get this if version is 2008 or above------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/