How to get the number of hours between the two dates in SQL Server
Example:
staffing_start_date (2017-08-01 06:00:00.00000)
staffing_end_dt (2017-08-01 18:00:00.00000)
You would use datediff():
select datediff(hour, staffing_start_date, staffing_end_date)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With