Take the 2-minute tour ×  I have a problem where my table stores
the date as  2009-01-10 10:00:00.000  and I have another table
which stores the date as  2009-01-10 12:00:00.000  I know they
are not the same but the dates are, is there away in SQL to
easily drop the time and keep just the dates for comparison?
Thanks.  share|improve this question What database are you
running? I believe the answer varies according to DB. –  Joe
Soul-bringer Jan 29 '09 at 20:42  16 Answers 16  Run this
SELECT DATEADD(dd, DATEDIFF(d, 0, Getdate()), 0)  change
Getdate() to your column name to strip the date  BTW if you are
doing a comparison it is better to do >= and < since it will
perform better  share|improve this answer Perform better as
opposed to what '='? –  Oliver S Jan 29 '09 at 20:22 than
running function in the where clause, take a look at
blogs.lessthandot.com/index.php/DataMgmt/DataDesign/… to see
what I mean –  SQLMenace Jan 29 '09 at 20:25 Of course, if
Oliver is just looking to compare the two dates, this is act