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)
 Date Delimiters

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-01-30 : 13:25:34
Adrian writes "I'm doing some work for a company with their own existing SQLServer v7 (NT4 SP6) and ASP. In my ASP select statements I enclose dates with a single quote. This works fine on every server I've ever worked on except this customers server where I get the following error:

Microsoft OLE DB Provider for SQL Server error '80040e07'

The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value.

Where the SQL is:

SELECT * FROM ROTATIONS WHERE Request_Date >= '2001-1-1' And Request_Date <= '2001-1-31' ORDER BY Rotation

The question is what is the correct format for specifying date criteria?

Thanks
Adrian"
   

- Advertisement -