I have a datetime column in table that has time component.
Is there anyway I can set '2011-03-14 11:46:31' to '2011-03-14 00:00:00'?
declare @date as datetime
set @date = getdate()
Select Cast(Floor(Cast(@date as float)) as DateTime)
Prior to 2k8 I always;
DATEADD(DAY, DATEDIFF(DAY, 0, datecol), 0)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With