Extracting hours from a DateTime (SQL Server 2005)

SELECT DATEPART(HOUR, GETDATE());

DATEPART documentation

Leave a Comment