Use this syntax for the GETDATE
CONVERT(DATETIME, CONVERT(CHAR(10), GETDATE(), 101))
>Hi everyone,
>
>How do you compare only the date part of datetime fields?
>
>I tried examdate = GETDATE() and it does not compare to =. I compared examdate = '10/13/2002' and its equal. Is it comparing the time also?
>
>What is the proper code to compare only the two dates without the times in an SQL Query Criteria?
>
>Thanks
>Roland
-----------------------------------------
Cathi Gero, CPA
Prenia Software & Consulting Services
Microsoft C# / .NET MVP
Mere Mortals for .NET MVP
cgero@prenia.comwww.prenia.comWeblog: blogs.prenia.com/cathi