vendredi 22 juillet 2016

How to compare two dates to find time difference in SQL Server 2005, date manipulation

I have two columns:

job_start                         job_end
2011-11-02 12:20:37.247           2011-11-02 13:35:14.613

How would it be possible using T-SQL to find the raw amount of time that has passed between when the job started and when the job ended?

I tried this:

select    (job_end - job_start) from tableA

but ended up with this:

1900-01-01 01:14:37.367

Aucun commentaire:

Enregistrer un commentaire