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

Tronca la data a solo ora/minuto

declare @D as datetime = '2012-01-02T12:04:11.443'

select dateadd(hour, datediff(hour, 0, @D), 0)
select dateadd(minute, datediff(minute, 0, @D), 0)