Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 How do I question. (basic select statment)

Author  Topic 

sqluser
Starting Member

6 Posts

Posted - 2001-05-10 : 12:12:08
I need to select a group of records based on a datetime field, except I want the query criteria to ignore the time part of the datetime. For example:
SELECT [date] FROM tblOrders
WHERE [date] = '2/9/01'

This should work except that the actuall data looks like this:
2/9/01 8:45:31 AM
2/9/01 9:27:32 AM
2/9/01 10:18:17 AM
I have tried using the date with a wildcard which does not work. Is there another way to get the date to "ignore" the time part?
thanks

   

- Advertisement -