datetime difference in hours sql server code example Example: sql hours between two dates DATEDIFF ( hour, start_date , end_date )