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

datetime a totalminute in sql

Ecco un esempio:

DECLARE @dt datetime 
SET @dt = '01-01-2001 07:10:20'
SELECT DATEDIFF(MINUTE, DATEADD(DAY, DATEDIFF(DAY, 0, @dt), 0), @dt)