Date to Integer value | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Date to Integer value

I have following queries, but i cannot able to convert date to integer value Select UsrPsd.UserCode, jobM.JobNo, jobM.JobDate, jobM.AssignBy,
jobM.JobDescription, jobM.EstimateHour, jobM.EstimateCompleteDate
–( Select Sum(CheckOutDateTime – CheckInDateTime) from jaJobLog–Where jaJobLog.JobNo = jobM.JobNo
–and CheckOutDateTime is not Null ) as TotalHourSpend from stdUserPassword UsrPsd
Left Join jaJobHd jobM On UsrPsd.UserCode = jobM.AssignTo
and jobM.Status = ‘I’
Where UsrPsd.AgentCode = ‘HUBLINE IT’
and UsrPsd.Active = ‘Y’ Regards
Ranjan

you want the date different in hour ? minute ?
use datediff
select sum(datediff(minute, CheckInDateTime, CheckOutDateTime))
from . . . KH
]]>