Sql Date/Time Statement for SQL Server (Full Version)

All Forums >> [Web Development] >> ASP and Database



Message


dzirkelb1 -> Sql Date/Time Statement for SQL Server (5/2/2008 11:40:49)

I have a data column that is formated as a datetime column on an sql 2000 server. However, it includes the time in the field also...here is an example of a piece of data:

05/01/2008 7:12:50 PM

When i try to query it by 5/1/2008 only, I get no results. How can I query this data for just the date?




Spooky -> RE: Sql Date/Time Statement for SQL Server (5/2/2008 15:53:20)

Use BETWEEN '05/01/2008' AND '05/02/2008'




dzirkelb1 -> RE: Sql Date/Time Statement for SQL Server (5/2/2008 16:01:01)

That works, thanks!




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
4.711914E-02