mysql - Drop Time in DateTime -


I have a problem where my table date is

  as of 2009-01-10 10: 00: 00.000  

and I have another table that stores the date

  2009-01-10 12: 00: 00.000  

I know that they are not the same, but there are dates, where are the easy dates to leave time in SQL and just have dates for comparison? Thank you.

run it

  SELECT DATEADD (dd, DATEDIFF (0, Getdate ()), 0)  

To get the date to get Getdate () in your column name

BTW if you are doing a comparison Better> = and & lt; Because it will perform better


Comments