T-SQL to trim a datetime to the nearest date?
One way is to change getdate()
to your column name,
select dateadd(dd, datediff(dd, 0, getdate())+0, 0)
Why not convert straight to date:
select convert(date, getdate())
This truncates days, not rounds. To round Days do this:
select convert(date, getdate() + 0.5)