Nirmal KumarC

Nirmal KumarC

  • 1.4k
  • 327
  • 78.6k

how to two varchar value between value?

Dec 30 2014 5:29 AM
How to get Two varchar values between difference time
 
Example:
 
Sql server 2008 query
 
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 Shiftend
09:00 18:00
 
I want Result is 09:00:00 Hours in sql server 2005.

Answers (2)