Link to home
Start Free TrialLog in
Avatar of aswam1975
aswam1975

asked on

T-SQL datetime equality comparison

I would like to check wethere 2 columns which are of type dateime have the same date.When I test ,I see that
table1.dateT1 = table2.date2 does not work,even though they have the same date time/ Should I have to convert to a string to do the same?
ASKER CERTIFIED SOLUTION
Avatar of grant300
grant300

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
A computed column or function-based index (features in 15.x) to convert the datetime to just data are good solutions
Avatar of grant300
grant300

Ther world will be a better place when most of us are running >=15 :-)

Bill