I have two tables where column [date] is type of DATETIME2(0).
[date]
DATETIME2(0)
I have to compare two records only by theirs Date parts (day+month+year), di
Use the CAST to the new DATE data type in SQL Server 2008 to compare just the date portion:
CAST
DATE
IF CAST(DateField1 AS DATE) = CAST(DateField2 AS DATE)