isolate a column value and related hours in sql code example Example: get hour from date sql SELECT DATEPART(HOUR, GETDATE());