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
 General SQL Server Forums
 New to SQL Server Programming
 SQL Date and time Between

Author  Topic 

mvanwyk
Yak Posting Veteran

99 Posts

Posted - 2009-05-28 : 08:36:21
Hi Guys.

We have a table with about 2 mil rows in it.

I want to select rows only for a specific date, can someone please help me out.

select * from Message where createdate < '2009/05/27 23:59:00 PM' and createdate < '2009/05/27 00:01:00 AM'

This does not seem to work.

Thanks In advance.

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2009-05-28 : 08:37:42
select * from Message where createdate >= '20090527' and createdate < '20090528'



E 12°55'05.63"
N 56°04'39.26"
Go to Top of Page
   

- Advertisement -