sql get hour from timestamp code example Example 1: sql server get utc date GETUTCDATE() Example 2: get hour from date sql SELECT DATEPART(HOUR, GETDATE());