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
]]>

Software Reviews | Book Reviews | FAQs | Tips | Articles | Performance Tuning | Audit | BI | Clustering | Developer | Reporting | DBA | ASP.NET Ado | Views tips | | Developer FAQs | Replication Tips | OS Tips | Misc Tips | Index Tuning Tips | Hints Tips | High Availability Tips | Hardware Tips | ETL Tips | Components Tips | Configuration Tips | App Dev Tips | OLAP Tips | Admin Tips | Software Reviews | Error | Clustering FAQs | Performance Tuning FAQs | DBA FAQs |