Extracting hours from a DateTime (SQL Server 2005) October 9, 2022 by Tarik SELECT DATEPART(HOUR, GETDATE()); DATEPART documentation