-2

I need to get all the records using MS SQL SELECT where Modified_Date=Today my table looks like:

created_by          modified_date
20150723081006      2015-07-23 15:14:22.843
20150723081006      2015-09-04 00:14:24.463
20150723081006      2015-09-04 00:14:24.463
AHiggins
  • 7,029
  • 6
  • 36
  • 54
Mike
  • 1

1 Answers1

0

One simple way to accomplish this would be to cast your modified date as a date value (removing the time portion) and then comparing it to the current date (again, with time removed):

SELECT *
FROM MyTable
WHERE CAST(Modified_Date AS DATE) = CAST(GETDATE() AS DATE)
AHiggins
  • 7,029
  • 6
  • 36
  • 54