Sqlserver
 sql >> Database >  >> RDS >> Sqlserver

Come aggiungo ore, minuti, secondi a dateadd sql?

DECLARE @start DATETIME
DECLARE @end DATETIME

SET @start = DATEADD(dd, 0, DATEDIFF(dd, 0, GETUTCDATE()))
SET @end = DATEADD(dd, 1, DATEADD(ms, -3, @start))