So I have a table in SQL Server with a datetime
column on it. I want to select all from this table:
select * from dbo.tblMessages
but I want to pass in a datetime
parameter. Then I want to select all messages from the table that have the same day
as the datetime
column in tblMessages
, not just ones posted in the past 24 hours, etc.
How would I do this?
Thanks.