How can I get the total minute for sql datetime?
Let\'s say:
select getdate() from table
In this way, I will get everything, but I
Here's a sample:
DECLARE @dt datetime SET @dt = '01-01-2001 07:10:20' SELECT DATEDIFF(MINUTE, DATEADD(DAY, DATEDIFF(DAY, 0, @dt), 0), @dt)