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

后端 未结 11 1819
天命终不由人
天命终不由人 2020-11-27 14:55

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 po

11条回答
  •  温柔的废话
    2020-11-27 15:35

    Take a look at DATEDIFF, this should be what you're looking for. It takes the two dates you're comparing, and the date unit you want the difference in (days, months, seconds...)

提交回复
热议问题