SELECT MIN(TestDate),MAX(TestDate)
FROM Dt
GROUP BY CONVERT(VARCHAR,TestDate,101),DATEPART(HH,TEstDate),DATEPART(Mi,TestDate)
Remarks:
Dt Is the Table Name and TestDate is the column Name
↧