I have some datetime columns in a MSSQL db... start_time/ End_time.
Each containing values in format "2015-01-03 05:45:01"
I want to find the difference between the end time and start time. What is the best way to achieve the same? For eg:
End Time: "2015-01-03 05:45:01"
Start Time: "2015-01-03 01:35:01"
--> 4 hours 10 minutes (or likes)
There is a possibility that my start time and end time span multiple days.
I tried datediff, but, it does not give accurate results. Any help is appreciated.