SQL Server : Comparing date without time
by toy
I’m facing such problem which is comparing date with full datetime field. So, the problem is when I want to compare full datetime field that contains time. It will return 0 row, because sql server will also compare time too. No matter you have the exact same date, but you have the different time. This is the solution, just convert full datetime file to only date.
SQL
select cast(floor(cast([datetime field] as float)) as datetime) from [your table]
Twitter
Facebook