Link to home
Start Free TrialLog in
Avatar of ochness
ochness

asked on

Date_Time Field in SQL Query (T-SQL)

I am some what new to SQL and am trying to query a table that has a date_time field in it and filter by that date_time field. The field shows the date and then the time that the line was written to the database.. i.e. '2001-10-31 15:35:24.000'.

My question is how do I get all data that happened on a specific day (like 10-31-2011) regardless of what the time is?

Thank you in advance for any help with this.
ASKER CERTIFIED SOLUTION
Avatar of tim_cs
tim_cs
Flag of United States of America image

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
Avatar of ochness
ochness

ASKER

Thank you very much. This is a new system for me and the previous system I used didn't track the time...it was all set to 00:00:00 so I never had to worry about the time part.

Thanks again.
Avatar of Guy Hengel [angelIII / a3]
better check this article out to do things correctly:
https://www.experts-exchange.com/A_1499.html

above will eventually fail in some setups ...