How to get Two varchar values between difference time Example: Sql server 2008 query Collapse | Copy Code select cast(dateadd(minute, datediff(minute,ShiftStart , ShiftEnd), 0) as time(0) ) FROM Accounts_DailyAttendance where UserID=2060 AND datename(month,processdate) ='September' and datepart(yyyy,processdate)=2014.
But I want Sql server 2005,How to get Shiftstart((varchar(50)) and Shiftend((varchar(50)) time between time. EXAMPLE:Shiftstart Shiftend09:00 18:00 I want Result is 09:00:00 Hours in sql server 2005.