Answers for "sql server getdate add hours"

SQL
1

get hour from date sql

SELECT DATEPART(HOUR, GETDATE());
Posted by: Guest on July-20-2020
0

SQL server select to get sum of hours

SELECT DATEADD(ms, SUM(DATEDIFF(ms, '00:00:00.000', YourFieldName)), '00:00:00.000') as time FROM YourTableName
Posted by: Guest on June-24-2020

Code answers related to "SQL"

Browse Popular Code Answers by Language